(Re-posting - was mistakenly in VB5/5 forum - sorry!)
My client has asked for a simple macro to toggle pictures (inserted from clipboard) via buttons in the sheet. The macro I wrote works as it's supposed to on Excel 2003, however my client has a Mac with Office 2004, and reports that "nothing is happening".
I use form buttons (not ActiveX), and I see nothing in the few lines of code that would explain why this isn't working in Office 2004.
The code in the client's document is as follows:
(in a separate module
Sub togglePic(picname As String)
ActiveWorkbook.ActiveSheet.Shapes(picname).Visible = Not (ActiveWorkbook.ActiveSheet.Shapes(picname).Visible)
End Sub
(on the sheet with the button on
Sub name_Click()
Call togglePic("name")
End Sub
for a checkbox called "name" on the ActiveSheet, referring a picture called "name". (The picture name gets set when I first generate this code by another macro (for each picture individually) before I send the file on to my client.)
Does anyone have ANY ideas? (Ruling out an obvious one: yes, my client has macros enabled. And he's running the latest OS (presumably Snow Leopard?)
Any help greatly appreciated!
My client has asked for a simple macro to toggle pictures (inserted from clipboard) via buttons in the sheet. The macro I wrote works as it's supposed to on Excel 2003, however my client has a Mac with Office 2004, and reports that "nothing is happening".
I use form buttons (not ActiveX), and I see nothing in the few lines of code that would explain why this isn't working in Office 2004.
The code in the client's document is as follows:
(in a separate module
Sub togglePic(picname As String)
ActiveWorkbook.ActiveSheet.Shapes(picname).Visible = Not (ActiveWorkbook.ActiveSheet.Shapes(picname).Visible)
End Sub
(on the sheet with the button on
Sub name_Click()
Call togglePic("name")
End Sub
for a checkbox called "name" on the ActiveSheet, referring a picture called "name". (The picture name gets set when I first generate this code by another macro (for each picture individually) before I send the file on to my client.)
Does anyone have ANY ideas? (Ruling out an obvious one: yes, my client has macros enabled. And he's running the latest OS (presumably Snow Leopard?)
Any help greatly appreciated!