Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have written a macro that will loop through every workbook in a
certain directory. I would like to use that for several other macros that will do things in the workbooks. Is there a way, I can use an InputBox to call the routine/sub I want to run with the Loop procedure? Thanks in Advance, JC |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
how about
call inputbox("Enter sub to call") -- Don Guillett Microsoft MVP Excel SalesAid Software "John Cole, Jr." wrote in message oups.com... I have written a macro that will loop through every workbook in a certain directory. I would like to use that for several other macros that will do things in the workbooks. Is there a way, I can use an InputBox to call the routine/sub I want to run with the Loop procedure? Thanks in Advance, JC |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Aug 20, 3:16 pm, "Don Guillett" wrote:
how about call inputbox("Enter sub to call") -- Don Guillett Microsoft MVP Excel SalesAid Software "John Cole, Jr." wrote in ooglegroups.com... I have written a macro that will loop through every workbook in a certain directory. I would like to use that for several other macros that will do things in the workbooks. Is there a way, I can use an InputBox to call the routine/sub I want to run with the Loop procedure? Thanks in Advance, JC- Hide quoted text - - Show quoted text - Tried that, and I got an error. JC |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry. try this
Application.Run InputBox("Enter sub to call") -- Don Guillett Microsoft MVP Excel SalesAid Software "John Cole, Jr." wrote in message ups.com... On Aug 20, 3:16 pm, "Don Guillett" wrote: how about call inputbox("Enter sub to call") -- Don Guillett Microsoft MVP Excel SalesAid Software "John Cole, Jr." wrote in ooglegroups.com... I have written a macro that will loop through every workbook in a certain directory. I would like to use that for several other macros that will do things in the workbooks. Is there a way, I can use an InputBox to call the routine/sub I want to run with the Loop procedure? Thanks in Advance, JC- Hide quoted text - - Show quoted text - Tried that, and I got an error. JC |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Aug 20, 5:25 pm, "Don Guillett" wrote:
Sorry. try this Application.Run InputBox("Enter sub to call") -- Don Guillett Microsoft MVP Excel SalesAid Software "John Cole, Jr." wrote in oglegroups.com... On Aug 20, 3:16 pm, "Don Guillett" wrote: how about call inputbox("Enter sub to call") -- Don Guillett Microsoft MVP Excel SalesAid Software "John Cole, Jr." wrote in ooglegroups.com... I have written a macro that will loop through every workbook in a certain directory. I would like to use that for several other macros that will do things in the workbooks. Is there a way, I can use an InputBox to call the routine/sub I want to run with the Loop procedure? Thanks in Advance, JC- Hide quoted text - - Show quoted text - Tried that, and I got an error. JC- Hide quoted text - - Show quoted text - ....Like a charm. Thanks a lot! JC |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use the brute force approach
Add string names for the function in the test box like Function1 Function2 Function3 then read input box FunctionName = inputbox.text then use a select function to do the call select case Function Name Case "Function 1" call Function1 Case "Function 2" call Function2 Case "Function 3" call Function3 end Select "John Cole, Jr." wrote: I have written a macro that will loop through every workbook in a certain directory. I would like to use that for several other macros that will do things in the workbooks. Is there a way, I can use an InputBox to call the routine/sub I want to run with the Loop procedure? Thanks in Advance, JC |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
application.run YourMacroNameVariableHere
(No checking at all!) But I wouldn't do this. I'd give the user (including me!) a way to run the procedure that I wanted. For additions to the worksheet menu bar, I really like the way John Walkenbach does it in his menumaker workbook: http://j-walk.com/ss/excel/tips/tip53.htm Here's how I do it when I want a toolbar: http://www.contextures.com/xlToolbar02.html (from Debra Dalgleish's site) "John Cole, Jr." wrote: I have written a macro that will loop through every workbook in a certain directory. I would like to use that for several other macros that will do things in the workbooks. Is there a way, I can use an InputBox to call the routine/sub I want to run with the Loop procedure? Thanks in Advance, JC -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
InputBox with VBA | Excel Discussion (Misc queries) | |||
InputBox | Excel Discussion (Misc queries) | |||
Call Center Management: How to calculate 'cost per call' | Excel Discussion (Misc queries) | |||
Inputbox and Application.InputBox | Excel Programming | |||
inputbox | Excel Programming |