Passing an index to a second workbook
Hi Again,
Underneath is what I wanted ...
Just having a problem still to open the file when it is closed!
Brgds Sige
1stworkbook
Private Sub HelpButton_Click()
Const Counter As Long = 25
SaveSetting "HelpWorkbook", "Index", "HelpID", Counter
Application.Run "help.xls!ShowUserformHelp"
End Sub
2nd Workbook: "help.xls" :
Sub ShowUserformHelp()
UserForm1.Show
End Sub
Private Sub UserForm_Initialize()
Dim Counter As Long
Dim Helpdescription As Range
' Get setting from registry
Counter = GetSetting("HelpWorkbook", "Index", "HelpID", 0)
Set Helpdescription = ThisWorkbook.Sheets("IndexSheet").Range("Help")
Label1.Caption = Application.VLookup(Counter, Helpdescription, 2,
False)
End Sub
|