Save REGISTRY Values
When the OK is pressed on my UserForm, lots of things happen. Then I save my settings so the program can find them the next time.
Private Sub cmdOK_Click()
'Write parameters to REGISTRY for reuse
frmCopyCharges.Hide
Workbooks(CopyTo).Activate
Sheets(cmbTabsWithin.Value).Select
SheetTo = Me.cmbTabsWithin.Value
PerformCopyFormat 'Bunch of stuff done to the data
'Perform the copy operation based on parameters
SaveSetting RPTNAME, APPNAME, KeyTO, cmbOpenSpreads.Value 'save Sheet name
SaveSetting RPTNAME, APPNAME, ToTab, cmbTabsWithin.Value 'save Tab name
SaveSetting RPTNAME, APPNAME, "LastCopy", Now() 'save date value
End Sub
I have not tested this with Access or Word but I don’t see any reason it will not work. The syntax may be slightly different
|