Excel VBA Introduction Part 34 - Type Declarations (User-Defined Types)

preview_player
Показать описание


By Andrew Gould

Рекомендации по теме
Комментарии
Автор

Never before in my life have I started watching videos by liking it before actually seeing the content. Wonderful tutorial! Thank you very much for wonderful job!

dawidmisiak
Автор

Thank you WiseOwl. All your tutorials have always been helpful.

darejoshua
Автор

a hundred likes from me mr. wiseowl... Thanks for the tutorials.. They are great!

andreasy
Автор

Dear Sir, With help of WiseOwl VBA series, I have developed multiple MACROs. It's really awesome. Thanks for your admirable efforts!!! Will you please create a complete video on VBA filter?

kalpeshbhawsar
Автор

Great and useful thanks for this video.

SolidSnake
Автор

Hi Mr. Gould. As always, another excellent tutorial.

There is something I tried and it seems to work. Inside subroutine 'TestContact'; it is possible to declare variable 'c' as an array i.e. 'Dim c(30) as Contact' results 30 array elements of type Contact including 5 elements each within HomeAddress & WorkAddress as well. A multi-dimensional array.

So it's like creating an Array out of a Type declaration. This looks like an undocumented Excel VBA feature. Or am I wrong somewhere? Just liked to bring this into your notice. Thanks!

jmathew
Автор

Isn't it better then using VBA classes? What the (dis)advantages hat the "Types" against the classes? 🤔🤔

walerij
Автор

Hi, I am not getting intelligence list for Type variables, please suggest. for eg, Dim John as Film. I am not getting intelligence list for John. Please suggest.

NarendraSunku
Автор

Is there a way to reference another defined type based on the what is selected in another type? An example would be using the MSForms type initially and having it select another type such as frame or label:

MSForms.Frame and MSForms.Label

They have a similar list, but they are not exactly similar. I'm trying to avoid writing the same lines in different types over and over. I've searched around, and I haven't found any answers.

prestondukes
Автор

Isn't there a way to do it automatically? Function GenreText. If I have 400 types of Genre, I wouldn't want to create 800 lines of code for this only.
Something like GenreText(NewFilm) ... NewFilm will be index 2. So I would probe UserDefined type Genres and return the test on the index number 2?

songokussjcz
Автор

Type declarations seem similar to enumerations

jayjayf
Автор

About your spelling...programmers aren't supposed to know how to spell. :-D

ericbrenner