Sub mySheetData()
'
'By Joe Was
'This adds a sheet and names it "Test."
Sheets.Add.Name = "Test"
'This selects your new sheet and moves it after sheet "Sheet3," which could be any sheet name.
Sheets("Test").Select
Sheets("Test").Move After:=Sheets("Sheet3")
'this selects the sheet with the data and its range.
Sheets("Sheet1").Select
Range("A1:A7").Select
'This will copy and paste the data to your new sheet "Test."
Selection.Copy
Sheets("Test").Select
ActiveSheet.Paste
'At this point your data will be on the new sheet and selected for the next step.
End Sub
This askes the user for a new sheet name and makes the new sheet.
Sub IBoxSheet()
Dim mySheet As String
'This code asks the user for a new Sheet name.
'Then makes a new Sheet with the users inputed name.
mySheet = Application.InputBox(prompt:="Enter the name of your new Sheet: ", Title:="Add Sheet!", Type:=1 + 2)
Sheets.Add.Name = mySheet
End Sub
Hope this helps. JSW
This message was edited by Joe Was on 2002-05-29 19:26