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-2017

Updated:  12/10/2017 15:42
This page added:  11 September 2011