Good morning,
I have a spreadsheet that I'd let to set up with a Command button on one sheet that will open a Save As dialogue box for a new spreadsheet and then copy data from another sheet to the new sheet when being saved.
Thank you
Jim
Good morning,
I have a spreadsheet that I'd let to set up with a Command button on one sheet that will open a Save As dialogue box for a new spreadsheet and then copy data from another sheet to the new sheet when being saved.
Thank you
Jim
Jim
To get the Save as dialog you can use Application.GetSaveAsFilename.
Not really clear to me what you want to do from there.
Do you want to create a new, blank worksheet, copy data to it from the sheet/workbook with the command button, and then save it with the filename from Application.GetSaveAsFilename.
If posting code please use code tags, see here.
Hi Norie,
I'd like this button to the SaveAs filename box. When the file is saved, I'd like all data from populated fields in another sheet saved to the new excel document automatically. I hope that makes sense.
Jim
I was able to get the command button working to open a new save as dialogue box, just need to figure out how save the values of my 3rd sheet of my workbook to the new excel file.
Thanks
Jim
Jim
Can you post what you have so far?
Also, what values do you want to copy and where do you want to copy them to in the new workbook?
This is what I have so far...
Private Sub CommandButton1_Click()
Set NewBook = Workbooks.Add
Workbooks("Crew_Hours_Tracking_Sheet-_rev1_122013 (1).xlsx").Worksheets("Violations").Range("A1:C62").Copy
NewBook.Worksheets("Sheet1").Range("A1").PasteSpecial (xlPasteValues)
End Sub
I'm also worried that if the file name is changed that the Workbook listed won't change too.
Thanks
Jim
Jim
What workbook is 'listed'?
PS Can you use code tags when posting code?
Yes I will give it a shot. The workbook listed in the code is Crew_Hours_Tracking_Sheet-_rev1_122013 (1).xlsx.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks