Friday, September 28, 2007

VBA for EXCEL Code Snippets

Hi all ,
I will be adding a little bit of code here and there to the BLOG in the form of Excel Code as I find out a little more on the subject as I go along the path to becoming a VB person !! [anorak not included]

Heres some code that uses the InputBox Function to then add a number of required additional worksheets to your Spreadsheet.

' Code to create additional Worksheets
Sub AddXWorksheets()
Dim myNum As String

myNum = Application.InputBox("Enter the number of additional WorkSheets required")
Worksheets.Add After:=Worksheets(Worksheets.Count), Count:=myNum
End Sub

Thankyou !

No comments:

Search This Blog

Desktop Applications Training Blog


Jamie Johnson
JJSurf IT Training Ltd
http://www.jjsurf.co.uk/
There was an error in this gadget
There was an error in this gadget

The Daily Puppy