Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use hyperlink to open workbook read only? Clif McIrvin[_2_] Excel Discussion (Misc queries) 3 April 9th 10 02:48 AM
Running a macro in a open as read-o Workbook TBarreiro Excel Programming 0 September 2nd 05 04:02 PM
Running a macro in a open as read-o Workbook TBarreiro Excel Programming 0 September 2nd 05 03:55 PM
Application Error when running Macro on Workbook open TM[_2_] Excel Programming 1 October 2nd 03 10:53 AM
Application Error when running Macro on Workbook open TM[_2_] Excel Programming 0 September 15th 03 12:33 PM


All times are GMT +1. The time now is 04:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"