adding more sheets
-
- Posts: 30
- Joined: Wed Feb 01, 2017 1:45 pm
hi all after having a look though the post's i cannot seem to find what i am looking for:- so could anyone tell me how to add nmore sheets to the multi excel sheet.i have tried but it will not do the pre designed sheets just a blank sheet any help would be most welcome thank you
- MemphisFlash
- Posts: 2127
- Joined: Fri May 16, 2014 10:12 pm
- Location: Leicester
click on the last sheet that looks like what you want in excel,
then right click, then move or copy, select copy, tick create a copy.
Job Done..
then right click, then move or copy, select copy, tick create a copy.
Job Done..
-
- Posts: 30
- Joined: Wed Feb 01, 2017 1:45 pm
thanks had a mess about with it after post and found it.......thanks again
If you want to create a lot of sheets (e.g. if you're using it for Greyhounds with a lot of events in a day), you could try pasting this code into the "Bet Angel" sheet and then run it by clicking anywhere in the code and pressing F5.
Just change the variable "longNumberOfSheets" to equal the number of extra sheets that you want to create after the master sheet.
Code: Select all
Sub CleanupWorkbook()
Dim longLoopy As Long
Dim longNumberOfSheets As Long
Dim longReturnCode As Long
' How many sheets do you want to create?
longNumberOfSheets = 200
longReturnCode = MsgBox("Are you sure - this will delete all the existing data!", vbOKCancel, "Careful!")
If longReturnCode = vbCancel Then
Exit Sub
End If
Dim objWorkSheet As Worksheet
Application.DisplayAlerts = False
For Each objWorkSheet In Worksheets
If UCase(Left(objWorkSheet.Name, 11)) = UCase("Bet Angel (") Then
objWorkSheet.Delete
End If
Next
Application.DisplayAlerts = True
' Now clean out the Master Sheet
Workbooks(ThisWorkbook.Name).Worksheets("Bet Angel").Range("C2:C6").ClearContents
Workbooks(ThisWorkbook.Name).Worksheets("Bet Angel").Range("F2:F4").ClearContents
Workbooks(ThisWorkbook.Name).Worksheets("Bet Angel").Range("B9:K128").ClearContents
For longLoopy = 9 To 128 Step 2
Workbooks(ThisWorkbook.Name).Worksheets("Bet Angel").Range("L" & longLoopy & ":S" & longLoopy).ClearContents
Workbooks(ThisWorkbook.Name).Worksheets("Bet Angel").Range("L" & longLoopy + 1 & ":S" & longLoopy + 1).ClearContents
Next longLoopy
Workbooks(ThisWorkbook.Name).Worksheets("Bet Angel").Range("T9:AE128").ClearContents
Workbooks(ThisWorkbook.Name).Worksheets("Bet Angel").Range("A1:A128").ClearContents
For longLoopy = 1 To longNumberOfSheets
If longLoopy = 1 Then
Sheets("Bet Angel").Copy After:=Sheets("Bet Angel")
Sheets("Bet Angel (2)").Name = "Bet Angel (1)"
Else
Sheets("Bet Angel").Copy After:=Sheets("Bet Angel (" & longLoopy - 1 & ")")
End If
Next
End Sub
- MemphisFlash
- Posts: 2127
- Joined: Fri May 16, 2014 10:12 pm
- Location: Leicester
Or if you want one already created take a look at this one i created
viewtopic.php?f=31&t=14604
You do not have the required permissions to view the files attached to this post.