Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I'm new to VBA and could use some help. I'm trying to have a macro perform the same function (paste a rectangle) across several selected sheets (say, 1-4,7,9,10 of 10). I can get the macro to paste the rectangle across ALL the sheets, but I only want it on those selected. Any ideas? Thanks in advance, Stephan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As always, post your coding efforts for comments and suggestions.
-- Don Guillett SalesAid Software wrote in message ups.com... Hi all, I'm new to VBA and could use some help. I'm trying to have a macro perform the same function (paste a rectangle) across several selected sheets (say, 1-4,7,9,10 of 10). I can get the macro to paste the rectangle across ALL the sheets, but I only want it on those selected. Any ideas? Thanks in advance, Stephan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here's the code I currently have:
Sub CoverStopwatch() ' ' CoverStopwatch Macro ' Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets sh.Select ActiveSheet.Shapes.AddShape(msoShapeRectangle, 3.75, 39.75, 79.5, 37.5). _ Select Selection.ShapeRange.Fill.ForeColor.SchemeColor = 19 Selection.ShapeRange.Fill.Visible = msoTrue Selection.ShapeRange.Fill.Solid Selection.ShapeRange.Line.Visible = msoFalse Selection.ShapeRange.Shadow.Visible = msoFalse ActiveSheet.Shapes.AddShape(msoShapeRectangle, 4.5, 540#, 82.5, 21.75). _ Select Selection.ShapeRange.Fill.ForeColor.SchemeColor = 19 Selection.ShapeRange.Fill.Visible = msoTrue Selection.ShapeRange.Fill.Solid Selection.ShapeRange.Line.Visible = msoFalse Selection.ShapeRange.Shadow.Visible = msoFalse Range("Q1:V1").Select Next sh End Sub Thanks. Don Guillett wrote: As always, post your coding efforts for comments and suggestions. -- Don Guillett SalesAid Software wrote in message ups.com... Hi all, I'm new to VBA and could use some help. I'm trying to have a macro perform the same function (paste a rectangle) across several selected sheets (say, 1-4,7,9,10 of 10). I can get the macro to paste the rectangle across ALL the sheets, but I only want it on those selected. Any ideas? Thanks in advance, Stephan |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks!
Don Guillett wrote: Sub ss() For Each ws In ActiveWindow.SelectedSheets MsgBox ws.Name Next ws End Sub -- Don Guillett SalesAid Software wrote in message ups.com... Here's the code I currently have: Sub CoverStopwatch() ' ' CoverStopwatch Macro ' Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets sh.Select ActiveSheet.Shapes.AddShape(msoShapeRectangle, 3.75, 39.75, 79.5, 37.5). _ Select Selection.ShapeRange.Fill.ForeColor.SchemeColor = 19 Selection.ShapeRange.Fill.Visible = msoTrue Selection.ShapeRange.Fill.Solid Selection.ShapeRange.Line.Visible = msoFalse Selection.ShapeRange.Shadow.Visible = msoFalse ActiveSheet.Shapes.AddShape(msoShapeRectangle, 4.5, 540#, 82.5, 21.75). _ Select Selection.ShapeRange.Fill.ForeColor.SchemeColor = 19 Selection.ShapeRange.Fill.Visible = msoTrue Selection.ShapeRange.Fill.Solid Selection.ShapeRange.Line.Visible = msoFalse Selection.ShapeRange.Shadow.Visible = msoFalse Range("Q1:V1").Select Next sh End Sub Thanks. Don Guillett wrote: As always, post your coding efforts for comments and suggestions. -- Don Guillett SalesAid Software wrote in message ups.com... Hi all, I'm new to VBA and could use some help. I'm trying to have a macro perform the same function (paste a rectangle) across several selected sheets (say, 1-4,7,9,10 of 10). I can get the macro to paste the rectangle across ALL the sheets, but I only want it on those selected. Any ideas? Thanks in advance, Stephan |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Glad to help
-- Don Guillett SalesAid Software wrote in message oups.com... thanks! Don Guillett wrote: Sub ss() For Each ws In ActiveWindow.SelectedSheets MsgBox ws.Name Next ws End Sub -- Don Guillett SalesAid Software wrote in message ups.com... Here's the code I currently have: Sub CoverStopwatch() ' ' CoverStopwatch Macro ' Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets sh.Select ActiveSheet.Shapes.AddShape(msoShapeRectangle, 3.75, 39.75, 79.5, 37.5). _ Select Selection.ShapeRange.Fill.ForeColor.SchemeColor = 19 Selection.ShapeRange.Fill.Visible = msoTrue Selection.ShapeRange.Fill.Solid Selection.ShapeRange.Line.Visible = msoFalse Selection.ShapeRange.Shadow.Visible = msoFalse ActiveSheet.Shapes.AddShape(msoShapeRectangle, 4.5, 540#, 82.5, 21.75). _ Select Selection.ShapeRange.Fill.ForeColor.SchemeColor = 19 Selection.ShapeRange.Fill.Visible = msoTrue Selection.ShapeRange.Fill.Solid Selection.ShapeRange.Line.Visible = msoFalse Selection.ShapeRange.Shadow.Visible = msoFalse Range("Q1:V1").Select Next sh End Sub Thanks. Don Guillett wrote: As always, post your coding efforts for comments and suggestions. -- Don Guillett SalesAid Software wrote in message ups.com... Hi all, I'm new to VBA and could use some help. I'm trying to have a macro perform the same function (paste a rectangle) across several selected sheets (say, 1-4,7,9,10 of 10). I can get the macro to paste the rectangle across ALL the sheets, but I only want it on those selected. Any ideas? Thanks in advance, Stephan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to run on selected sheets | Excel Discussion (Misc queries) | |||
How to run macro on selected sheets with one go? | Excel Discussion (Misc queries) | |||
Perform Row Function Using Macro | Excel Programming | |||
Challenging Macro to perform evaluate function on each cell | Excel Programming | |||
Getting a macro to perform a function on a certain day every week. | Excel Programming |