×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

ms excel programing using vba

ms excel programing using vba

ms excel programing using vba

(OP)

 how to create a new sheet (i.e.) one more & where to write
 the code in which sheet coding?

RE: ms excel programing using vba

The menu Insert|Worksheet item allows you to add sheets to a workbook.

Macros are associated with the workbook, not with the worksheet.

TTFN

RE: ms excel programing using vba

The easiest way to determine this is to turn on macro recording, do the action, turn off recording and go look at the macro created.

RE: ms excel programing using vba

This method works as a good place to start, but there are a number of Excel commands that are not recorded. Also, you should look at the help for that object because they way that the Macro recorder works is most often in my experience not the way that I need it to work. Thus, I often use this method only to get an idea of what I should do.

RE: ms excel programing using vba

The command:

'ActiveWorkbook.Worksheets.Add'

will add a sheet before the active worksheet in the active workbook.

'Worksheets.Add.Move after:=Worksheets(Worksheets.Count)'

will add a sheet and move it to the end of all visible worksheets.
To get to the VB editor, go to 'Tools + Macro + Visual Basic Editor'.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources