I am trying to copy paste special values on tab "april 2010". That works. Next I'm trying to create a new tab. That works. Then I want to move some data from April 2010 onto the newly created tab. That does not work. It gives me a subscript out of range error at:
Sheets("Open Orders").Range("a1").Select
What am I doing wrong with regards to moving the data once the second tab has been created? Also is there anyway to do this without selecting everything? I know that's 'slow'.
Sub DbDatabase_Conversion()
Dim wks As Worksheet
Set wks = Sheets("April 2010 Daily Board")
Application.DisplayAlerts = False
wks.Range("a:ca").Select
Selection.Copy
wks.Range("a1").Select
Selection.PasteSpecial Paste:=xlValues
Sheets.Add.Name = "OpenOrders"
wks.Range("A75:ca104").Select
Selection.Cut
Sheets("Open Orders").Range("a1").Select
Selection.PasteSpecial Paste:=xlValues
Application.DisplayAlerts = True
End Sub
Bookmarks