Message 1 of 3
Store InputBox value somewhere in the applcation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have a macro for importing CAD files. I have an inputbox where I ask the user to specify the manufacturer. I am trying to store this MFG for the next time the macro runs. I am trying a global variable, but after the program quits, the next time it runs the global is cleared.
Public LastStrMFG 'global
.......
'Specify the manufacturer
Dim strMFG As String
strMFG = InputBox("Who is the manufacturer? Leave blank if saving outside of Purch.", "Specify manufacturer", LastStrMFG)
'Here is where I want to store the input for the next execution
LastStrMFG = strMFG
I have gotten around this in the past by storing/recalling values in a file. This is more complicated than I want to do for what could simply be a retained value stored somewhere in the project. How do I do this? There are several spots where I could use this functionality.
Any help would be appreciated. Thanks.
Rafael