MichaelM62
New Member
- Joined
- Oct 18, 2022
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
I am working on a conversion tool to convert an old style form to a new style form.
I have the converter working to the point where I copy the data from the old file by hand and then paste it into the form and it saves the new style form automatically.
I would like it if my code could be updated so it copies the data between A4 and P2500 from the first file in my folder, paste it into the "INPUT" tab starting at A4 on my conversion sheet, save the converted file (as it currently does), then clears the data that was pasted and repeats with the next file in my folder.
Current VBA:
Private Sub CommandButton1_Click()
Dim rng As Range
Set rng = Range("N21")
Worksheets(Array("Parent Equipment", "Child Components")).Copy
Worksheets("Parent Equipment").UsedRange.Value = Worksheets("Parent Equipment").UsedRange.Value
Worksheets("Child Components").UsedRange.Value = Worksheets("Child Components").UsedRange.Value
ActiveWorkbook.SaveAs rng
End Sub
'VBA Create New Workbook (Excel File)'
I have the converter working to the point where I copy the data from the old file by hand and then paste it into the form and it saves the new style form automatically.
I would like it if my code could be updated so it copies the data between A4 and P2500 from the first file in my folder, paste it into the "INPUT" tab starting at A4 on my conversion sheet, save the converted file (as it currently does), then clears the data that was pasted and repeats with the next file in my folder.
Current VBA:
Private Sub CommandButton1_Click()
Dim rng As Range
Set rng = Range("N21")
Worksheets(Array("Parent Equipment", "Child Components")).Copy
Worksheets("Parent Equipment").UsedRange.Value = Worksheets("Parent Equipment").UsedRange.Value
Worksheets("Child Components").UsedRange.Value = Worksheets("Child Components").UsedRange.Value
ActiveWorkbook.SaveAs rng
End Sub
'VBA Create New Workbook (Excel File)'