Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Ruben Jackson   on Feb 06 In MS Office Category.

  
Question Answered By: Doyle Gonzalez   on Feb 06

Each sheet  has a unique name (user-assigned, if the defaults are
changed), and also a unique number. See the Excel VBA object model for
how to handle unique numbers. I am going to demonstrate this for unique
names only.

You can tackle this as follows:

Sub Rectangle_Sheets()

' This procedure calls the rectangle_make macro  for user-defined sheets
in this workbook.

Dim i As Integer

For i = 1 To 4
Sheets("Sheet" & i).Select
Call rectangle_make
Next i

Sheets("Sheet7").Select
Call rectangle_make

For i = 9 To 10
Sheets("Sheet" & i).Select
Call rectangle_make
Next i

End Sub

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Macro to Perform Same Function Only on Certain Sheets Or get search suggestion and latest updates.


Tagged: