Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Attribute in "hidden" header of macro: MyMacro.VB_ProcData.VB_Invoke_Func
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Attribute in "hidden" header of macro: MyMacro.VB_ProcData.VB_Invoke_Func
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 Loop End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
What is VB_Invoke_Func attribute? | Excel Programming | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Macro to concatenate into "B1" B2 thru B"x" based on new data in "Col A" | Excel Discussion (Misc queries) | |||
Use of "&" in Header name ex. "CS&T" comes back CS&[Time]? | Excel Discussion (Misc queries) | |||
Macro to find copy "header" and paste | Excel Discussion (Misc queries) |