Does the following statement make sense?
Quote:
When a macro is named with the same name as an internal command, the macro runs in place of the command.
Printable View
Does the following statement make sense?
Quote:
When a macro is named with the same name as an internal command, the macro runs in place of the command.
I think so.
It makes sense in Word but the same facility is not in other Office programs - least I couldn't swear for all of them but I think it's only Word.Quote:
When a macro is named with the same name as an internal command, the macro runs in place of the command.
Thanks, Tony.
Another question....
I have private sub and public sub.
I have function.
WTF is Type??
Anne,
I would not say you were obligated to describe IF statements in the same topic as WITH statements. Two very seperate and different methods. Or did I miss something? (Just found this thread.)
Re: Ken's file, I need to get it up. Did you take a look at it Anne? Is it helping?
I believe this will give you an error in Excel, at least it does for me. You should get a compile error that says, "Expected identifier."Quote:
When a macro is named with the same name as an internal command, the macro runs in place of the command.
I'm not using the file. I'm simply providing a link to it.
I've decided to scratch specific references to with and ifs and such in each of the procedures we're providing. BUT, I am gonna provide a brief description of those kinds of statements.
In other words, I was gonna say "the following procedure uses blah blah; refer to the appendix". I've decided to just say in the beginning something like "for a brief explanation on many of the ...., see the appendix."
If I'm following this, Type is basically a definition of a Data Structure.
Say you are working with information about a person. You could have lots of variables - name, age, email addy, inside leg, whatever. Or you could declare a Type:
[VBA]Type PersonDetails
Name as String
Age As Long ' To allow for modern miracles
EMail as String
InsideLeg as Integer
End Type
[/VBA]
and then you could declare a variable of that Type instead of one of the built in types:
[VBA]Dim Tony as PersonDetails[/VBA]
and you would have access to all of the details in a kind of obvious way:
[VBA]Tony.Name = "Tony"
Tony.Age = 52[/VBA] etc.
or you could have an array of friends and want the same info on all of them:
[VBA]Dim Friend(1 to 100) as PersonDetails
Friend(1).Name = "Anne"
Friend(2).Name = "Annie"
Friend(3).Name = "Dreamboat"[/VBA]
I could go on ... :rofl
I see that EYE am not in that list of friends??
What's up with that!!!???
Thanks!!
:think:
Anne, I noticed that he didn't put the End Sub line in... maybe you're the first one off the screen. :dunno
There! I fixed his code!
:rotlaugh:
And here you say you know nothing about VBA! :thumb
You see, you DO know code :cool:
I was writing code for you - and I just guessed that you might have some friends with those names. You can use your real friends if you like.:rotlaugh: