PC Review


Reply
Thread Tools Rate Thread

Autoexecute macro

 
 
Joanne M.
Guest
Posts: n/a
 
      15th Jun 2007
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.

Can anyone help me?

Joanne

 
Reply With Quote
 
 
 
 
Paul Morgan
Guest
Posts: n/a
 
      15th Jun 2007
Hi, use the macro recorder to created actions you require, then copy
and paste the macro in the workbook open event



this site

http://contextures.com/xlvba01.html

will show you where the modules are located


eventually it will be in a spot like this

Private Sub Workbook_Open()
'your code here
End Sub

 
Reply With Quote
 
Joanne M.
Guest
Posts: n/a
 
      15th Jun 2007
On Jun 15, 9:59 am, Paul Morgan <paulandrewmor...@gmail.com> wrote:
> Hi, use the macro recorder to created actions you require, then copy
> and paste the macro in the workbook open event
>
> this site
>
> http://contextures.com/xlvba01.html
>
> will show you where the modules are located
>
> eventually it will be in a spot like this
>
> Private Sub Workbook_Open()
> 'your code here
> End Sub


Let me try this.

 
Reply With Quote
 
=?Utf-8?B?TWlrZSBI?=
Guest
Posts: n/a
 
      15th Jun 2007
Joanne,

Auto running a macro is achieved by using the Workbook_Open macro so you
could use:-

Private Sub Workbook_Open()
Worksheets.Add
End Sub

There's no point in adding any columns because the sheet already has as many
as is allowed.

With regard to the last bit I think you need to clarify what you mean
because numbering all column A would take a fair while and you would only end
up with duplicate row numbers.

Mike

"Joanne M." wrote:

> 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.
>
> Can anyone help me?
>
> Joanne
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Start Word with autoexecute macro fails in Word 2003 =?Utf-8?B?Si5BLlIuIEthcnJlbWFucw==?= Microsoft Word Document Management 3 21st Aug 2006 01:03 PM
how do i run an autoexecute macro in excel =?Utf-8?B?cm9iaW4gbW9ycmlz?= Microsoft Excel Worksheet Functions 2 6th Jul 2006 04:36 PM
autoexecute a macro on the start of a show =?Utf-8?B?QmlsbA==?= Microsoft Powerpoint 4 11th Nov 2005 03:59 PM
Autoexecute ACCESS97 macro jboozer Windows XP 1 29th Jul 2005 12:47 PM
Re: Opening an AutoExecute Macro Workbook from an AutoExecute Macro Workbook Tom Ogilvy Microsoft Excel Programming 0 8th Jul 2003 03:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:08 AM.