Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It sounds like you have something outside your procedure.
This version (untested for the long path) seems to work ok: Option Explicit Sub testme() Dim Answer As Long Answer = MsgBox("Do you want to continue ?", _ vbOKCancel, "My Title") If Answer = vbOK Then ActiveWorkbook.FollowHyperlink Address:= _ "Q:\AR, Retail Support & Cash Management\Retail Support\" & _ "VOUCHERS\New Vouchers\Live\Voucher Issue Spreadsheets to date\" _ & "Corporate Voucher Issues to date.xls", _ NewWindow:=False, AddHistory:=True Sheets("Nav").Select Range("A1").Select Else Exit Sub End If End Sub Check for extraneous characters after your End Sub or between any End Sub and next Sub (if you have multiple procedures within the module). "Fraggs <" wrote: Code: -------------------- Answer = MsgBox("Do you want to continue ?", _ vbOKCancel, "My Title") If Answer = vbOK Then ActiveWorkbook.FollowHyperlink Address:= _ "Q:\AR, Retail Support & Cash Management\Retail Support\VOUCHERS\New Vouchers\Live\Voucher Issue Spreadsheets to date\Corporate Voucher Issues to date.xls" _ , NewWindow:=False, AddHistory:=True Sheets("Nav").Select Range("A1").Select Else If Answer = vbCancel Then Exit Sub -------------------- Thats the offending code. doesnt want to work for some reason :( --- Message posted from http://www.ExcelForum.com/ -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Solver - error - Compile Error | Excel Discussion (Misc queries) | |||
help with this error-Compile error: cant find project or library | Excel Discussion (Misc queries) | |||
How do I get rid of "Compile error in hidden module" error message | Excel Discussion (Misc queries) | |||
Compile error in hidden module error | Excel Programming |