Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No copy workbook method in Excel 97? 2

Status
Not open for further replies.

money99

Programmer
Jan 21, 2003
8
GB
Hi there. I developed a small macro where the user fills in data on a worksheet and at the end he could press a button which copied the workbook onto the clipboard. I made this at home using office 2000 but when I took it back to work where office 97 is still used the copy method failed. Is there any way round this problem? I was copying the worksheet.
 
Pls post the code that is failing and an indicator as to which line it fails on Rgds
Geoff
"Some cause happiness wherever they go; others whenever they go."
-Oscar Wilde
 
This is the line that fails and it is the only line assigned to the button. What it did was to automatically open a new workbook with the worksheet pasted.
Workbooks("FEED2.1.xls").Worksheets("FormSheet").Copy
Regards
Vas
 
What error do you get ??
Just tried the line and it works fine on my excel ('97 SP2, NT4)

If you are using a Controls Toolbox button, you will need to set the "Take Focus On Click" property to false. NB - the only way I could get an error from your code was to set the property to true and that gives a 1004 error Rgds
Geoff
"Some cause happiness wherever they go; others whenever they go."
-Oscar Wilde
 
Thanks Geoff.
It opened the document in 97 with the "take focus on click" property set to true.
Vas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top