How to copy and past from a temp workbook to another vba

jackjo05

New Member
Joined
Dec 19, 2013
Messages
8
I need help coming up with a formula in vba to copy and paste sheets from a temp workbook toanother work book.
These are the methods I have come up with and tried but don't work or don't know how to so if any one can help or has ideas that would be great!
1) Solution:Search the names of the workbook and then copy and paste into certain tabs of the work sheet.
Problem: Can not search for unsaved names, get the error that they are out of range
Code:
Code:
<CODE>Sub test()
For Each w In Workbooks
If Not (w.Name Like "*Title of Temo sheet1*") And Not (w.Name Like "*Title of saved sheet*") Then 
Windows(w.Name).ActivateExit For
End If
Next w
End Sub</CODE>
</PRE>
2) Solution: Use a formula to search in row A1 of all active worksheets except the specific one that is already saved and say if if row A1= this word, copy and paste into saved workbook in a certain spreadsheet.
Code: Have none yet
3)Solution: automatically save unsaved files to use solution 1 then delete the files using the vba
Code: Have none yet
4)Solution: Any suggestions from you guys! Thanks!
Any help is welcome! Thanks
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top