Attribute in "hidden" header of macro: MyMacro.VB_ProcData.VB_Invoke_Func

  • Thread starter Thread starter nathan8pi
  • Start date Start date
N

nathan8pi

Hi - Newbie VB-er (+ poster to Usenet) - I'm guessing this is the place
to find Excel VBA gurus?

When I export a recorded macro I can see, and change, the attribute
that determines the shortcut key (Q in this instance):

MyMacro.VB_ProcData.VB_Invoke_Func = "Q\n14"

Q1: What does the rest (i.e. _\n14_) of the attribute do?
Q2: Why is this not visible in VB editor?
Q3: Is VB_Invoke_Func a property of an object called VB_ProcData?
Q4: I was doing a tutorial on a MS website (http://tinyurl.com/3dcpg)
but the first example doesn't work for me:

***Excerpt***
Customizing Microsoft® Office Excel 2003 with the Excel object model
is easy. Really easy. You don't need an advanced degree in computer
science. You don't need to know C or C++ or any other programming
language, for that matter. You don't need to know anything about object
models.

To make the point, look at the following lines of code.

Sub ColorEverySecondRow()
Const Gray = 15
Range("A2").EntireRow.Select
Do While ActiveCell.Value <> ""
Selection.Interior.ColorIndex = Gray
ActiveCell.Offset(2,0).EntireRow.Select
Loop
End Sub

Can you figure out what this code does in Excel?
***EndExcerpt***

Can anyone explain why?


Thanks in advance...

Nate
 
Figured out why the snippet of code didn't work:
Q4: I was doing a tutorial on a MS website (http://tinyurl.com/3dcpg)
but the first example doesn't work for me:


Sub ColorEverySecondRow()
Const Gray = 15
Range("A2").EntireRow.Select
Do While ActiveCell.Value <> ""

This assumes there are values in column A of activeworksheet - to
colour alternate rows in blank worksheet replace with: ___Do While
ActiveCell.Value = ""___
Selection.Interior.ColorIndex = Gray
ActiveCell.Offset(2,0).EntireRow.Select

A2 is still ActiveCell(?) - this seems to work:

ActiveCell.Offset(2, 0).Select
ActiveCell.EntireRow.Select
 
Back
Top