Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Don't understand your question. You already have code for calling a sub in a
module and passing the arguments/parameters as follows:- Run "InvCol_" & x, vName, vNum The above works when InvCol_x is in a standard module. One of your questions in a previous post on this thread referred to Me but that was explained. Simply replace it with the Userform name. Your quote: "I got into the problem of which module the code is sitting with". Not sure if I understand but you should not need to specify the module. However, having said that, you cannot have subs by the same name in different standard modules or you cannot call them. If this does not answer your question then perhaps you can elaborate on your question with examples. -- Regards, OssieMac "Minitman" wrote: Hey OssieMac, Thanks for the reply. Do you know of a way of starting a procedure with a split name (part text and part variable) I got into the problem of which module the code is sitting with the Run command {Run On Mon, 18 Jan 2010 07:31:02 -0800, OssieMac wrote: Hi Minitman "It was working until I changed the calling method to include a variable to simplify the code." This surprises me. However, if you called it with the following method it would have worked. Call InvCol_1(vName, vNum) However, having said that, the only code you should have in the Userform code area is the event code for the userform. All other code which is called should be in a standard module and if you move the called code to a standard module you will most likely fix the problem. . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
run time error 1004 general odbc error excel 2003 vba | Excel Programming | |||
Error 1004 opening workbook 1004 | Excel Programming | |||
Error when cell A1 is not active and xlInsideVertical border formatthrowing error 1004 | Excel Programming | |||
run-time error '1004': Application-defined or object-deifined error | Excel Programming | |||
Syntax Error Runtime Error '424' Object Required | Excel Programming |