Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello,
I am trying to copy a sheet, saving as a new workbook, values & number formats also with the filename taken from (A1) all with the click of a button, sounds easy! here is the macro Dim myFileName As String With ActiveWorkbook * *worksheets(1).Copy 'to a new workbook * with active sheet with.UsedRange. Copy.PasteSpecial Paste:=xlPasteValues 'remove formulas??? * 'pick up the name from some cells??? *myfilename = .range("a1").value & ".xls" myfilename = "C:\Users\Ditchy\Desktop\" & myfilename *'???? ..Parent.SaveAs Filename:=myFileName, FileFormat:=xlWorkbookNormal ..Parent.Close savechanges:=False End With End Sub any and all help appreciated regards Ditchy Ballarat Australia |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to update a column in a work based on another work sheet | New Users to Excel | |||
VBA code sort problems - recorded macro does not work with userform | Excel Programming | |||
Problems with macro | Excel Discussion (Misc queries) | |||
Problems with my Work rota set-up | Excel Programming | |||
If I have a work sheet protected and try to run a macro to hide rows or columns it won't work. Correct? | Excel Programming |