View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Rachel Rios Rachel Rios is offline
external usenet poster
 
Posts: 1
Default How to insert new worksheet based on # of rows in a data sourch

Hello,

I am trying to get the below VBA code to only copy "form" and create
new worksheet based on number of rows with data in my "data" sheet.
Is there a way that can be done?

Sub Copy_Sheets()

Dim i As Integer
Dim wks As Worksheet

For i = 1 To 45

Sheets("form").Copy After:=Sheets(2)
Next

End Sub