Hello - am stumped trying to determine what could be happening.
I have created some code in ThisWorkBook, capturing a double click event in a particular cell. When double clicking, this code executes exactly as designed, no issues.
I want to also be able to call this double click via a menu and from within another procedure, basically "fooling" the computer into thinking a double click occurred. I didn't want to simply copy/paste/duplicate the code in another procedure, so I created a tiny sub routine that simply calls the Doubleclick event. This works as expected on my computer, but not on another. On the second computer, I am getting the dreaded "Method or data member not found".
As mentioned, this works on my computer, every time. But on another computer, it stops at "Public Sub InfoPopUp" with the "Method or data member not found".,
Any ideas what I should be looking for? Or a better way to accomplish what I am trying to do?
Thanks,
Terry
I have created some code in ThisWorkBook, capturing a double click event in a particular cell. When double clicking, this code executes exactly as designed, no issues.
I want to also be able to call this double click via a menu and from within another procedure, basically "fooling" the computer into thinking a double click occurred. I didn't want to simply copy/paste/duplicate the code in another procedure, so I created a tiny sub routine that simply calls the Doubleclick event. This works as expected on my computer, but not on another. On the second computer, I am getting the dreaded "Method or data member not found".
Code:
Public Sub Workbook_SheetBeforeDoubleClick(ByVal sh As Object, ByVal target As Range, Cancel As Boolean)
Dim DefPath As Variant...
'and a bunch of code that works on both computers.
End sub
I call this code like this:
Public Sub InfoPopUp()
Call ThisWorkbook.Workbook_SheetBeforeDoubleClick(ThisWorkbook, Selection, True)
End Sub
As mentioned, this works on my computer, every time. But on another computer, it stops at "Public Sub InfoPopUp" with the "Method or data member not found".,
Any ideas what I should be looking for? Or a better way to accomplish what I am trying to do?
Thanks,
Terry