|
-
Sep 30th, 2000, 08:30 PM
#1
Ok, I think whatt I need here is to copy some Excel cells, & store them in the Clipboard, then I want to close the specific Spreadsheet, and insert the clipboard data into my next sheet.
I'm having various problems getting it to work. First of all I can't seem to bypass the automated (Office 2000) Do you want to save the large amount of data? Dialog box. If I just close the spreadsheet the clipboard is losing it's value. Below is the applicable exerpt from my code, I tried recording one Excel, but the transfer isn't working quite right, I tried keeping both spreadsheets open but it doesn't work wither because I belive it because my string holds the Full Path Name of one of the spreasheets, which once it's open Excel doesn't understand.
'Excel is already open to this spreadheet at this point
Windows("MP3_Export.xls").Activate
Range("A2:Finish").Copy
ActiveWindow.Close
' Open MP3 Collection List designated by user on form
' Code works here
CollectionList = Me.txtCollectionsList.Text
Workbooks.Open FileName:=CollectionList
Range("A1").Select
LastRow = Selection.End(xlDown).Offset(1, 0).Select
'Fails here, nothing in clipboard to paste
ActiveSheet.Paste
' Works here on out
Range("A2").Select
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Key2:=Range("B2") _
, Order2:=xlAscending, Key3:=Range("C2"), Order3:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
ActiveWorkbook.Save
TIA
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|