Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, could someone could tell me why this:
public valuex as string Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Application.ScreenUpdating = False UserForm11.Show Target.Value = valuex Application.ScreenUpdating = True End Sub valuex =combobox3 (combobox3 on_change event) and valuex appears as empty althought I declared it (public valuex as string) I also trayed to declare valuex on my userform module TIA |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Public variables should be declared in a standard module. The modules
for sheets and forms are Class Modules. Try moving: public valuex as string to a standard module. Hope this helps Rowan filo666 wrote: Hi, could someone could tell me why this: public valuex as string Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Application.ScreenUpdating = False UserForm11.Show Target.Value = valuex Application.ScreenUpdating = True End Sub valuex =combobox3 (combobox3 on_change event) and valuex appears as empty althought I declared it (public valuex as string) I also trayed to declare valuex on my userform module TIA |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you very much, it works as expected
"Rowan Drummond" wrote: Public variables should be declared in a standard module. The modules for sheets and forms are Class Modules. Try moving: public valuex as string to a standard module. Hope this helps Rowan filo666 wrote: Hi, could someone could tell me why this: public valuex as string Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Application.ScreenUpdating = False UserForm11.Show Target.Value = valuex Application.ScreenUpdating = True End Sub valuex =combobox3 (combobox3 on_change event) and valuex appears as empty althought I declared it (public valuex as string) I also trayed to declare valuex on my userform module TIA |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You're welcome.
filo666 wrote: Thank you very much, it works as expected |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF Statement not working | Excel Worksheet Functions | |||
If statement working only once | Excel Worksheet Functions | |||
If Statement Not Working | Excel Worksheet Functions | |||
For Each Statement still not working | Excel Programming | |||
If statement not working right | Excel Programming |