Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,616
- Office Version
- 365
- 2016
- Platform
- Windows
I have run into a pretty significant loss and after an exhaustive Google sesrch I wasn't able to find a solution to address my issue.
I have a userform for in workbook1. A click on one of it's objects is to facilitate the launching of a second userform in a second workbook (wb_rd). This second workbook (wb_rd) had been previously opened by by code in workbook1, so it is open, but hidden.
I've just started to receive the error again. My code started fine and not encountering the error. After some more developement I started to get this error. But, without reverting back any changes, the error disappeared. But now it has reappeared again. Not only do I know how to avoid it, I have no idea what it takes to cause it. It is an unreliable point in my code and I really should identify the cause and prevent it from happening once it gets released to users.
From workbook1, the object click code: "Cannot run the macro 'Rental_Detail.xlsm!macro_01'. The macro may not be available in this workbook or all macros may be disabled."
wb_rd, again, is a recognized workbook (workbook2) and !macro1 resides in a standard module within that workbook. The line in red is where the error happens.
When I first experienced this problem I posted here looking for a solution. Although someone was kind enough to share a possible solution, I have to admit it is far beyond the scope of my knowledge to adpat. I hope there is an easier solution.
I have a userform for in workbook1. A click on one of it's objects is to facilitate the launching of a second userform in a second workbook (wb_rd). This second workbook (wb_rd) had been previously opened by by code in workbook1, so it is open, but hidden.
I've just started to receive the error again. My code started fine and not encountering the error. After some more developement I started to get this error. But, without reverting back any changes, the error disappeared. But now it has reappeared again. Not only do I know how to avoid it, I have no idea what it takes to cause it. It is an unreliable point in my code and I really should identify the cause and prevent it from happening once it gets released to users.
From workbook1, the object click code: "Cannot run the macro 'Rental_Detail.xlsm!macro_01'. The macro may not be available in this workbook or all macros may be disabled."
Rich (BB code):
Private Sub lb_cntmissp_Click()
If lb_cntmissp.Caption = "0" Then Exit Sub
With wb_rd
Application.Run wb_rd.Name & "!macro_01"
End With
End Sub
wb_rd, again, is a recognized workbook (workbook2) and !macro1 resides in a standard module within that workbook. The line in red is where the error happens.
Rich (BB code):
Sub macro_01()
mri = 1 'true
MsgBox "MRI: " & mri
declarations_1
'group_1.Show
End Sub
When I first experienced this problem I posted here looking for a solution. Although someone was kind enough to share a possible solution, I have to admit it is far beyond the scope of my knowledge to adpat. I hope there is an easier solution.
Last edited: