Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello everybody
Sub CopyToWorkbook() Dim mypath As String If [cmpname] = 0 Then MsgBox ("company name not entered : enter company name") Exit Sub End If Worksheets("form").Select Worksheets("form").Copy.Values On Error Resume Next mypath = "e:\" & [cmpname] & "\" MkDir mypath ActiveWorkbook.SaveAs Filename:=mypath & [emp] & ".xls" ActiveWorkbook.Close Application.Goto Reference:="ename" Worksheets("form").PrintPreview End Sub The macro copies the "form" sheet to a new workbook and saves it in the folder and with assigned name. It works well. The macro copies the sheet keeping the formulae alive. I want to copy the sheet without formulae. i.e. only values. How to modify it? Any suggestions Regards Sreedhar |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |