Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to retain Userform Radio Button Memory after unload
Hi all,
I have created a Userform with 3 radio options, this is called as a subroutine within another macro, and i cannot seem to keep the memory of the selection choice "DateFilterSelection" after it unloads. Can anyone help me. Thank you in advance. The code is as follows: Private Sub OK_Click() Dim DateFilterSelection As String If StandardDate = True Then DateFilterSelection = "Standard" ElseIf BritishDate = True Then DateFilterSelection = "British" ElseIf AmericanDate = True Then DateFilterSelection = "American" End If Unload Me End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to retain Userform Radio Button Memory after unload
Move the variable declaration from sub click to a general module. Insert a
module and paste the below on top.. Public DateFilterSelection As String If this post helps click Yes --------------- Jacob Skaria "swiftcode" wrote: Hi all, I have created a Userform with 3 radio options, this is called as a subroutine within another macro, and i cannot seem to keep the memory of the selection choice "DateFilterSelection" after it unloads. Can anyone help me. Thank you in advance. The code is as follows: Private Sub OK_Click() Dim DateFilterSelection As String If StandardDate = True Then DateFilterSelection = "Standard" ElseIf BritishDate = True Then DateFilterSelection = "British" ElseIf AmericanDate = True Then DateFilterSelection = "American" End If Unload Me End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to retain Userform Radio Button Memory after unload
Hi Jacob,
Thanks, it works fine now. Have a great day ahead. Rgds Ray "Jacob Skaria" wrote: Move the variable declaration from sub click to a general module. Insert a module and paste the below on top.. Public DateFilterSelection As String If this post helps click Yes --------------- Jacob Skaria "swiftcode" wrote: Hi all, I have created a Userform with 3 radio options, this is called as a subroutine within another macro, and i cannot seem to keep the memory of the selection choice "DateFilterSelection" after it unloads. Can anyone help me. Thank you in advance. The code is as follows: Private Sub OK_Click() Dim DateFilterSelection As String If StandardDate = True Then DateFilterSelection = "Standard" ElseIf BritishDate = True Then DateFilterSelection = "British" ElseIf AmericanDate = True Then DateFilterSelection = "American" End If Unload Me End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Retain value of userform option button | Excel Programming | |||
Excel instance won't unload from memory | Excel Programming | |||
Excel instance won't unload from memory | Excel Programming | |||
userform Radio button updates text box | Excel Programming | |||
Unload from Memory | Excel Programming |