i6s1
12-13-2002, 11:00 AM
OK, I don't know anything about VB. I need a helping hand.
I have recorded a macro in "book1" that opens up "book2", copys some data from book2, closes book2, pastes it to book1.
The problem is that when I close book2, I get a message that "there is a lot of info on the clipboard, do you want this info to be available to other programs?"
This crashes the macro.
I've tried copying from book2, switching back to book1, pasting, and then closing book2, but book1's filename changes, so I don't know switch the active book without using the filename.
The macro will only be run on a single computer so if there is a way to disable that clipboard message, that would work fine.
Workbooks.Open Filename:="C:\Dynamics\APP\book2.xls"
Range("B8:Z15").Select
Selection.Copy
ActiveWindow.Close 'This closes book2, book1 becomes active again. This is where the dialog box comes up.
Range("B8:Z15").Select
ActiveSheet.Paste
Thanks for any help. I will try to explain things better if this is not clear
I have recorded a macro in "book1" that opens up "book2", copys some data from book2, closes book2, pastes it to book1.
The problem is that when I close book2, I get a message that "there is a lot of info on the clipboard, do you want this info to be available to other programs?"
This crashes the macro.
I've tried copying from book2, switching back to book1, pasting, and then closing book2, but book1's filename changes, so I don't know switch the active book without using the filename.
The macro will only be run on a single computer so if there is a way to disable that clipboard message, that would work fine.
Workbooks.Open Filename:="C:\Dynamics\APP\book2.xls"
Range("B8:Z15").Select
Selection.Copy
ActiveWindow.Close 'This closes book2, book1 becomes active again. This is where the dialog box comes up.
Range("B8:Z15").Select
ActiveSheet.Paste
Thanks for any help. I will try to explain things better if this is not clear