Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have thoroughly searched the group for an answer to this problem, but
nothing seems to fit the bill. I have created a userform that allows the user to select a variety of options in order to process incoming data files. Since our group is currently in the middle of two different processing years, I need to have the user indicate the year in which they are working. This is done with an Application.Inputbox just before the userform is closed. I have declared the variable, MyYear, as Public in a general module, but it comes up defined as Empty when the next userform appears. I used the Application,Inputbox method so I could force the end-user to input a year, or exit the sub if they cancelled the operation, so I had to Dim MyYear as Variant. Is this why the variable won't be retained by the Public declaration? I have tried: Public MyYear As Variant but have no more luck than any other method. I have other variables in the general module that are coming through just fine, but none of them are created using an input box. Thanks in advance for any and all suggestions (including, "stop writing code."), and let me know if a snippet of my code would help. Paul |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
pass variable from one workbook to another | Excel Discussion (Misc queries) | |||
Pass variable to macro | Excel Programming | |||
Pass a variable into a range? | Excel Programming | |||
Application.OnTime -- Unable to Pass Macro with Numeric Parameter | Excel Programming | |||
How to pass variable value between macros | Excel Programming |