Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running a macro in a open as read-o Workbook
I have this macro NOT running OK when I open the BCENTRAL.XLS as a read only. Can anyone help point out what I am missing here ? sub ....() On Error Resume Next lhn = Target.Row wb_name = ThisWorkbook.Name wsh_name = ThisWorkbook.ActiveSheet.Name On Error Resume Next Application.Run "BCentral.xls!PM_show_form2", lhn, wb_name, wsh_name ' it should have run here, but in a read only, it doesnt... ' the rest of the code I use when I'm runnig more Excel instances... xx = Error.Number If xx < 0 Then Else Set MyXL = GetObject(, "Excel.Application") If Err.Number < 0 Then ExcelWasNotRunning = True Err.Clear ' Clear Err object in case error occurred. DetectExcel Set MyXLx = GetObject("\\...\BCENTRAL.XLS") If IsEmpty(MyXLx) = False Then Set wk = MyXL.Worksheets("MAIN") MyXL.Run "BCentral.xls!PM_show_form2", lhn, wb_name, wsh_name, MyXL Else Err.Clear MsgBox ("BCENTRAL is missing") UserForm1.Show End If End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Use hyperlink to open workbook read only? | Excel Discussion (Misc queries) | |||
Running a macro in a open as read-o Workbook | Excel Programming | |||
workbook open read only without prompt | Excel Programming | |||
Application Error when running Macro on Workbook open | Excel Programming | |||
Application Error when running Macro on Workbook open | Excel Programming |