M
Mike Fry
I am reporting a VBA bug. I hope this is the right place to do that.
I'm in VBA writing macros for Excel 2004 with Mac OS X.
It seems that an Error (code 1004 I think) gets thrown whenever the
Copy method of a Range gets called while a Form is visible. The Copy
method works if I hide the form before using it.
For example, in code for a VBA form in an Excel workbook:
Private Sub CommandButton2_Click()
Worksheets(1).Range("A1").Copy ' Throws Error 1004
End Sub
Private Sub CommandButton2_Click()
Me.Hide
Worksheets(1).Range("A1").Copy ' Works, no error.
Me.Show
End Sub
This does not happen with Office for Windows, or with older versions
of Office for Mac. This bug makes apps fail because of upgrade to
Office 2004.
This error also occurs if the Copy method is invoked by the debugger.
The Application is in a state where almost all menu items are disabled
when a user Form is visible, including Edit/Copy. But Range.Copy
ought not refuse to do its job when Application is in that state.
Worksheet.Copy affected too.
Mike
I'm in VBA writing macros for Excel 2004 with Mac OS X.
It seems that an Error (code 1004 I think) gets thrown whenever the
Copy method of a Range gets called while a Form is visible. The Copy
method works if I hide the form before using it.
For example, in code for a VBA form in an Excel workbook:
Private Sub CommandButton2_Click()
Worksheets(1).Range("A1").Copy ' Throws Error 1004
End Sub
Private Sub CommandButton2_Click()
Me.Hide
Worksheets(1).Range("A1").Copy ' Works, no error.
Me.Show
End Sub
This does not happen with Office for Windows, or with older versions
of Office for Mac. This bug makes apps fail because of upgrade to
Office 2004.
This error also occurs if the Copy method is invoked by the debugger.
The Application is in a state where almost all menu items are disabled
when a user Form is visible, including Edit/Copy. But Range.Copy
ought not refuse to do its job when Application is in that state.
Worksheet.Copy affected too.
Mike