unable to set the OnAction Property of the Text Box

  • Thread starter Thread starter Russell Harris
  • Start date Start date
R

Russell Harris

I have a spreadsheet sent out to different countries around the world. When
it needs amendment a fix me file is sent out.



The following code works on all spreadsheets but those that have been in the
USA ?



It fails at the ** line with "unable to set the OnAction Property of the
Text Box Class"



Any suggestions would be appreciated.



Sub add_printbutton()

sMMAFILE = ActiveWorkbook.Name



Windows(sMMAFILE).Activate

Sheets("Title").Select



ActiveSheet.Shapes("Text Box 80").Select

Selection.Copy

Range("J33").Select

ActiveSheet.Paste

Selection.OnAction = sMMAFILE & "!pr_YE" ******************
 
Russell said:
The following code works on all spreadsheets but those that have been in the
USA ?

It fails at the ** line with "unable to set the OnAction Property of the
Text Box Class"

Selection.OnAction = sMMAFILE & "!pr_YE" ******************

If sMMAFILE might have a space in it then you need

Selection.OnAction = "'" & sMMAFILE & "'!pr_YE"


Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup
 
Back
Top