Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
kittronald presented the following explanation :
Garry, Hey, that works very nice ! So using CALL allows you to run macros in serial fashion and the colon acts as a multi-value delimiter. This is a real time saver as I can now walk away for a few hours instead of having to babysit this workbook and manually run each iteration of the macro every 40 minutes. Thanks again ! - Ronald K. Ron, You're welcome, ..again!<g Just to be clear, the 'Call' statement is well defined in the online help but I used it here because of the colon I used to separate the executables. Thus, the colon is a line-delimiter... Without colon: Sub Macro_Automate() Dim i As Integer With Sheets("Settings").ComboBox2 For i = 0 To .ListCount - 1 Sheets("Settings").Range("Data_Type") = .List(i) Call Macro_Change_Function Macro_Export_Output Next 'i End With End Sub With colon: Sub Macro_Automate() Dim i As Integer With Sheets("Settings").ComboBox2 For i = 0 To .ListCount - 1 Sheets("Settings").Range("Data_Type") = .List(i): Macro_Change_Function: Macro_Export_Output Next 'i End With End Sub **Note here that the 'Call' statement is not used AND the single line wraps here. In an effort to make it NOT wrap in the viewer I had to put the wrapped line (calls to 2 macros) as a separate line. Because these calls were separated by the colon, I had to use 'Call' so VB[A] wouldn't interpret the first call as a label. This would have happened because of the macro name[s] being treated as a single word. -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Iterating through cells, comparing values | Excel Programming | |||
Offset & Combobox's returned Value | Excel Programming | |||
Referring to OLEObjects (combobox's on worksheet) | Excel Programming | |||
checking for errors in combobox's | Excel Programming |