Creating Macro to copy data from one WB & Save to new WB
Closed
sawallac
Posts
2
Registration date
Thursday January 10, 2013
Status
Member
Last seen
January 11, 2013
-
Jan 10, 2013 at 04:05 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jan 11, 2013 at 11:18 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jan 11, 2013 at 11:18 AM
Related:
- Creating Macro to copy data from one WB & Save to new WB
- Save as pdf office 2007 - Download - Other
- Transfer data from one excel worksheet to another automatically - Guide
- How to save audio from messenger - Guide
- How to automatically save photos from messenger to gallery - Guide
- Tmobile data check - Guide
2 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jan 10, 2013 at 05:12 PM
Jan 10, 2013 at 05:12 PM
Well the first start could be if you start macro recorder, create a sheet as you want and then stop the macro. This can give you a good template to start
sawallac
Posts
2
Registration date
Thursday January 10, 2013
Status
Member
Last seen
January 11, 2013
Jan 11, 2013 at 09:40 AM
Jan 11, 2013 at 09:40 AM
The code below was recorded; but I am getting an error:
Sub PullData()
'
' PullData Macro
'
' Keyboard Shortcut: Ctrl+Shift+A
'
ActiveSheet.Range("$A$1:$S$63758").AutoFilter Field:=2, Criteria1:="2"
ActiveCell.Offset(-63764, 0).Range("A1:S3245").Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:="C:\Users\sawallac\Documents\Campus2.xlsx", _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
ActiveWindow.Close
ChDir "C:\Users\sawallac\Desktop\Project Management\FAC Need Projections"
ActiveWorkbook.SaveAs Filename:= _
"C:\Users\sawallac\Desktop\Project Management\FAC Need Projections\UOPFacultycourseload.xlsm" _
, FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
End Sub
Any Suggestions?
Sub PullData()
'
' PullData Macro
'
' Keyboard Shortcut: Ctrl+Shift+A
'
ActiveSheet.Range("$A$1:$S$63758").AutoFilter Field:=2, Criteria1:="2"
ActiveCell.Offset(-63764, 0).Range("A1:S3245").Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:="C:\Users\sawallac\Documents\Campus2.xlsx", _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
ActiveWindow.Close
ChDir "C:\Users\sawallac\Desktop\Project Management\FAC Need Projections"
ActiveWorkbook.SaveAs Filename:= _
"C:\Users\sawallac\Desktop\Project Management\FAC Need Projections\UOPFacultycourseload.xlsm" _
, FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
End Sub
Any Suggestions?
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jan 11, 2013 at 11:18 AM
Jan 11, 2013 at 11:18 AM
see this thread
it is same as you want , except that creates separate sheets instead of workbooks
https://ccm.net/forum/affich-258700-interesting-question-for-excel-champions
it is same as you want , except that creates separate sheets instead of workbooks
https://ccm.net/forum/affich-258700-interesting-question-for-excel-champions