Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ChangeLink problem
Hi Diddy,
I came across the same problem when executing a macro which uses the ChangeLink command. Executing through the Excel menu ("Extra"| Macro | Macro's |Execute") gave no error but calling the macro from the _click event of a command button gave the error you mentioned. After a while I noticed that using the menu also gave an error when the command button had the focus but not when a worksheet cell had the focus. For me, using Range("A1").Select before calling the macro solved the problem. So: Sub CommandButton1_Click() Call Macro_with_ChangeLink End Sub Results in an error And: Sub CommandButton1_Click() Range("A1").Select Call Macro_with_ChangeLink End Sub No problem at all. Regards, Peter *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ChangeLink problem
Thanks for that Peter,
I've saved this with my snippets! Cheers -- Deirdre "Peter" wrote: Hi Diddy, I came across the same problem when executing a macro which uses the ChangeLink command. Executing through the Excel menu ("Extra"| Macro | Macro's |Execute") gave no error but calling the macro from the _click event of a command button gave the error you mentioned. After a while I noticed that using the menu also gave an error when the command button had the focus but not when a worksheet cell had the focus. For me, using Range("A1").Select before calling the macro solved the problem. So: Sub CommandButton1_Click() Call Macro_with_ChangeLink End Sub Results in an error And: Sub CommandButton1_Click() Range("A1").Select Call Macro_with_ChangeLink End Sub No problem at all. Regards, Peter *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem with function WorkBook.ChangeLink | Excel Programming | |||
ChangeLink | Excel Programming | |||
ChangeLink | Excel Programming | |||
ChangeLink | Excel Programming | |||
ChangeLink | Excel Programming |