Do not copy buttons or macros

  • Thread starter Thread starter Gbiwan
  • Start date Start date
G

Gbiwan

Hi!

I use array to copy 2 of 4 sheets to a new workbook and save the new
workbook to a specific place...
What I need to do is not copy the buttons or spinners or macros to keep the
file as small as possible... is there a way to do this?

Thanks in advance for your help!
Greg
 
Instead of copying the worksheets, maybe just copying the cells and pasting them
into a new worksheet????
 
HI!

That would be best but... the size of the range changes with each payroll
and by user...

is there a way to create the new workbook using the first page (HO Payroll)
and then creating a second work sheet, then copying the used rows in a range
from columns A:Z ?

As always your help is greatly appreciated!

Greg
 
I think I'd just copy columns A:Z (was the used range really important?)

Option Explicit
Sub testme01()

Dim wks As Worksheet
Dim newWks As Worksheet

Set wks = ActiveWorkbook.Worksheets("HO Payroll")

Set newWks = Workbooks.Add(1).Worksheets(1) 'single sheet workbook

wks.Range("a:z").Copy _
Destination:=newWks.Range("a1")

End Sub
 
Back
Top