Help with Macro

  • Thread starter Thread starter Joanne M.
  • Start date Start date
J

Joanne M.

Maybe someone can help me here

What I need it this,

As soon as a user opens a specific file, the macro ( in vba), creates
another worksheet, inserts 3 columns and makes the first column auto
numbered. I am sure this isn't hard. But I am a "newbie" to this.

This all has to happen automatically when you open the file.


Can anyone help me?


Joanne
 
Answered in the excel.misc group.
Helpful information here...
http://www.cpearson.com/excel/newposte.htm
--
Jim Cone
San Francisco, USA


"Joanne M." <[email protected]>
wrote in message
Maybe someone can help me here

What I need it this,
As soon as a user opens a specific file, the macro ( in vba), creates
another worksheet, inserts 3 columns and makes the first column auto
numbered. I am sure this isn't hard. But I am a "newbie" to this.

This all has to happen automatically when you open the file.
Can anyone help me?
Joanne
 
Add a worksheet


Private Sub Workbook_Open()
With ThisWorkbook
.Worksheets.Add After:=.Worksheets(.Worksheets.Count)
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

Why would you want to insert 3 columns into an empty worksheet? And what
does turning it into auto numbered mean?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Back
Top