View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Michael Lanier Michael Lanier is offline
external usenet poster
 
Posts: 74
Default Macro that opens a separate workbook to a specified worksheet whenthe active workbook is right mouse clicked

I have a macro that opens a separate workbook when I right mouse click
but I want it to open to a specified sheet named "Wizard". It opens
the workbook by reading the string text displayed in M373 (see below).

Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal
Target As Range, Cancel As Boolean)
Dim VHM As Workbook
Set VHM = ActiveWorkbook
Dim exlApp As Excel.Application
Set exlApp = New Excel.Application
exlApp.Visible = True
exlApp.Workbooks.Open Worksheets("DataBase").Range("M373")
VHM.Activate
Cancel = True
End Sub

Thanks for any help you can offer.

Michael