Excel VBA

css navigation by Css3Menu.com

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

© 2011-2024

Updated:  06/21/2024 07:42
This page added:  11 September 2011