ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro recording (https://www.excelbanter.com/excel-discussion-misc-queries/178424-macro-recording.html)

MM[_3_]

Macro recording
 
I am unable to record macros that move or format objects - ovals, rectangles,
etc.

Macro security hsd been set to "enable all"


--
MM

Gord Dibben

Macro recording
 
What occurs when you attempt to record a macro performing manipulation of an
object?

Does the recorder work properly for purposes other than moving or formatting
objects?


Gord Dibben MS Excel MVP

On Sat, 1 Mar 2008 10:46:01 -0800, MM <MM@discussions. microsoft.com wrote:

I am unable to record macros that move or format objects - ovals, rectangles,
etc.

Macro security hsd been set to "enable all"



MM[_2_]

Macro recording
 
Yes everything else records properly
--
MM


"Gord Dibben" wrote:

What occurs when you attempt to record a macro performing manipulation of an
object?

Does the recorder work properly for purposes other than moving or formatting
objects?


Gord Dibben MS Excel MVP

On Sat, 1 Mar 2008 10:46:01 -0800, MM <MM@discussions. microsoft.com wrote:

I am unable to record macros that move or format objects - ovals, rectangles,
etc.

Macro security hsd been set to "enable all"




Gord Dibben

Macro recording
 
Please answer the first question.

Thank, Gord

On Sat, 1 Mar 2008 11:36:01 -0800, MM wrote:

Yes everything else records properly
--
MM


"Gord Dibben" wrote:

What occurs when you attempt to record a macro performing manipulation of an
object?

Does the recorder work properly for purposes other than moving or formatting
objects?


Gord Dibben MS Excel MVP

On Sat, 1 Mar 2008 10:46:01 -0800, MM <MM@discussions. microsoft.com wrote:

I am unable to record macros that move or format objects - ovals, rectangles,
etc.

Macro security hsd been set to "enable all"



MM[_2_]

Macro recording
 
It does not record anything related to the object
--
MM


"Gord Dibben" wrote:

Please answer the first question.

Thank, Gord

On Sat, 1 Mar 2008 11:36:01 -0800, MM wrote:

Yes everything else records properly
--
MM


"Gord Dibben" wrote:

What occurs when you attempt to record a macro performing manipulation of an
object?

Does the recorder work properly for purposes other than moving or formatting
objects?


Gord Dibben MS Excel MVP

On Sat, 1 Mar 2008 10:46:01 -0800, MM <MM@discussions. microsoft.com wrote:

I am unable to record macros that move or format objects - ovals, rectangles,
etc.

Macro security hsd been set to "enable all"




Gord Dibben

Macro recording
 
Nothing like this which is what I get when I record?

Sub Macro4()
Application.CommandBars("Drawing").Visible = True
ActiveSheet.Shapes.AddShape(msoShapeRectangle, _
143.25, 11.25, 170.25, 96.75).Select
Range("D13").Select
ActiveSheet.Shapes.AddShape(msoShapeOval, 478.5, 34.5, 174.75, 123#).Select
Range("G12").Select
ActiveSheet.Shapes("Rectangle 1").Select
Selection.ShapeRange.ScaleWidth 1.31, msoFalse, msoScaleFromBottomRight
Selection.ShapeRange.ScaleHeight 1.62, msoFalse, msoScaleFromTopLeft
ActiveSheet.Shapes("Oval 2").Select
Selection.ShapeRange.ScaleHeight 1.77, msoFalse, msoScaleFromTopLeft
Selection.Copy
Range("D23").Select
ActiveSheet.Paste
End Sub

I wouldn't know where to start troubleshooting.

Do you get any error messages?

Do you get the Sub Macro#() and the who and when lines then just End Sub?

Are you recording in the active workbook/worksheet in a single instance of
Excel?

Any ideas out there?

I guess that is a start at troubleshooting after all<g


Gord


On Sat, 1 Mar 2008 14:21:01 -0800, MM wrote:

It does not record anything related to the object



MM[_2_]

Macro recording
 
No, nothing like that

If I start with a spreadsheet with a blue rectangle & a blue triangle

And I manually type the following, the macro will enter 1 in cell A1,
change the color in the rectagle to yellow, enter 2 in cell A3, change the
color in the triangle to yellow, & enter 3 in cell A5

ActiveCell.FormulaR1C1 = "1"
ActiveSheet.Shapes("Rectangle 1").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Range("A3").Select
ActiveCell.FormulaR1C1 = "2"
ActiveSheet.Shapes("oval 3").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Range("A5").Select
ActiveCell.FormulaR1C1 = "3"

When I try to record this process, I get the following

Range("A1").Select
ActiveCell.FormulaR1C1 = "1"
Range("A3").Select
ActiveCell.FormulaR1C1 = "2"
Range("A5").Select
ActiveCell.FormulaR1C1 = "3"
Range("A6").Select

I do not receive any error messages

This is what I get I just change to colors on the rectangle & oval

Sub Macro5()
'
' Macro5 Macro
'

'
End Sub


I only have one instance of Excel, one workbook, & one worksheet

I have upgraded to the most recent service pack, no change before or after.

If anyone has any ideas, let me know.


--
MM


"Gord Dibben" wrote:

Nothing like this which is what I get when I record?

Sub Macro4()
Application.CommandBars("Drawing").Visible = True
ActiveSheet.Shapes.AddShape(msoShapeRectangle, _
143.25, 11.25, 170.25, 96.75).Select
Range("D13").Select
ActiveSheet.Shapes.AddShape(msoShapeOval, 478.5, 34.5, 174.75, 123#).Select
Range("G12").Select
ActiveSheet.Shapes("Rectangle 1").Select
Selection.ShapeRange.ScaleWidth 1.31, msoFalse, msoScaleFromBottomRight
Selection.ShapeRange.ScaleHeight 1.62, msoFalse, msoScaleFromTopLeft
ActiveSheet.Shapes("Oval 2").Select
Selection.ShapeRange.ScaleHeight 1.77, msoFalse, msoScaleFromTopLeft
Selection.Copy
Range("D23").Select
ActiveSheet.Paste
End Sub

I wouldn't know where to start troubleshooting.

Do you get any error messages?

Do you get the Sub Macro#() and the who and when lines then just End Sub?

Are you recording in the active workbook/worksheet in a single instance of
Excel?

Any ideas out there?

I guess that is a start at troubleshooting after all<g


Gord


On Sat, 1 Mar 2008 14:21:01 -0800, MM wrote:

It does not record anything related to the object




Gord Dibben

Macro recording
 
I start out with a Blue Rectangle and a Blue Triangle on the sheet then record
going through your steps.

I don't know why you are not getting any of the shapes manipulation code, most
of which is not necessary but would be nice to record something<g

I don't see an Excel version anywhere. I do not run 2007 version so may be a
function of that if you are running 2007?

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 3/1/2008 by Gord Dibben
'

'
Range("A1").Select
ActiveCell.FormulaR1C1 = "1"
ActiveSheet.Shapes("Rectangle 1").Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.SchemeColor = 64
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Range("A3").Select
ActiveCell.FormulaR1C1 = "2"
ActiveSheet.Shapes("AutoShape 2").Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.SchemeColor = 64
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Range("A5").Select
ActiveCell.FormulaR1C1 = "3"
End Sub


Gord

On Sat, 1 Mar 2008 16:40:00 -0800, MM wrote:

No, nothing like that

If I start with a spreadsheet with a blue rectangle & a blue triangle

And I manually type the following, the macro will enter 1 in cell A1,
change the color in the rectagle to yellow, enter 2 in cell A3, change the
color in the triangle to yellow, & enter 3 in cell A5

ActiveCell.FormulaR1C1 = "1"
ActiveSheet.Shapes("Rectangle 1").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Range("A3").Select
ActiveCell.FormulaR1C1 = "2"
ActiveSheet.Shapes("oval 3").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Range("A5").Select
ActiveCell.FormulaR1C1 = "3"

When I try to record this process, I get the following

Range("A1").Select
ActiveCell.FormulaR1C1 = "1"
Range("A3").Select
ActiveCell.FormulaR1C1 = "2"
Range("A5").Select
ActiveCell.FormulaR1C1 = "3"
Range("A6").Select

I do not receive any error messages

This is what I get I just change to colors on the rectangle & oval

Sub Macro5()
'
' Macro5 Macro
'

'
End Sub


I only have one instance of Excel, one workbook, & one worksheet

I have upgraded to the most recent service pack, no change before or after.

If anyone has any ideas, let me know.



MM[_2_]

Macro recording
 
I am running office 2007
--
MM


"Gord Dibben" wrote:

I start out with a Blue Rectangle and a Blue Triangle on the sheet then record
going through your steps.

I don't know why you are not getting any of the shapes manipulation code, most
of which is not necessary but would be nice to record something<g

I don't see an Excel version anywhere. I do not run 2007 version so may be a
function of that if you are running 2007?

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 3/1/2008 by Gord Dibben
'

'
Range("A1").Select
ActiveCell.FormulaR1C1 = "1"
ActiveSheet.Shapes("Rectangle 1").Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.SchemeColor = 64
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Range("A3").Select
ActiveCell.FormulaR1C1 = "2"
ActiveSheet.Shapes("AutoShape 2").Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.SchemeColor = 64
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Range("A5").Select
ActiveCell.FormulaR1C1 = "3"
End Sub


Gord

On Sat, 1 Mar 2008 16:40:00 -0800, MM wrote:

No, nothing like that

If I start with a spreadsheet with a blue rectangle & a blue triangle

And I manually type the following, the macro will enter 1 in cell A1,
change the color in the rectagle to yellow, enter 2 in cell A3, change the
color in the triangle to yellow, & enter 3 in cell A5

ActiveCell.FormulaR1C1 = "1"
ActiveSheet.Shapes("Rectangle 1").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Range("A3").Select
ActiveCell.FormulaR1C1 = "2"
ActiveSheet.Shapes("oval 3").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Range("A5").Select
ActiveCell.FormulaR1C1 = "3"

When I try to record this process, I get the following

Range("A1").Select
ActiveCell.FormulaR1C1 = "1"
Range("A3").Select
ActiveCell.FormulaR1C1 = "2"
Range("A5").Select
ActiveCell.FormulaR1C1 = "3"
Range("A6").Select

I do not receive any error messages

This is what I get I just change to colors on the rectangle & oval

Sub Macro5()
'
' Macro5 Macro
'

'
End Sub


I only have one instance of Excel, one workbook, & one worksheet

I have upgraded to the most recent service pack, no change before or after.

If anyone has any ideas, let me know.




Dave Peterson

Macro recording
 
I've seen a few posts that describe the same problem with xl2007. Lots of end
with a sigh and a hope that it's fixed in a future release.

MM wrote:

I am running office 2007
--
MM

"Gord Dibben" wrote:

I start out with a Blue Rectangle and a Blue Triangle on the sheet then record
going through your steps.

I don't know why you are not getting any of the shapes manipulation code, most
of which is not necessary but would be nice to record something<g

I don't see an Excel version anywhere. I do not run 2007 version so may be a
function of that if you are running 2007?

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 3/1/2008 by Gord Dibben
'

'
Range("A1").Select
ActiveCell.FormulaR1C1 = "1"
ActiveSheet.Shapes("Rectangle 1").Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.SchemeColor = 64
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Range("A3").Select
ActiveCell.FormulaR1C1 = "2"
ActiveSheet.Shapes("AutoShape 2").Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.SchemeColor = 64
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Range("A5").Select
ActiveCell.FormulaR1C1 = "3"
End Sub


Gord

On Sat, 1 Mar 2008 16:40:00 -0800, MM wrote:

No, nothing like that

If I start with a spreadsheet with a blue rectangle & a blue triangle

And I manually type the following, the macro will enter 1 in cell A1,
change the color in the rectagle to yellow, enter 2 in cell A3, change the
color in the triangle to yellow, & enter 3 in cell A5

ActiveCell.FormulaR1C1 = "1"
ActiveSheet.Shapes("Rectangle 1").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Range("A3").Select
ActiveCell.FormulaR1C1 = "2"
ActiveSheet.Shapes("oval 3").Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 13
Selection.ShapeRange.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Range("A5").Select
ActiveCell.FormulaR1C1 = "3"

When I try to record this process, I get the following

Range("A1").Select
ActiveCell.FormulaR1C1 = "1"
Range("A3").Select
ActiveCell.FormulaR1C1 = "2"
Range("A5").Select
ActiveCell.FormulaR1C1 = "3"
Range("A6").Select

I do not receive any error messages

This is what I get I just change to colors on the rectangle & oval

Sub Macro5()
'
' Macro5 Macro
'

'
End Sub


I only have one instance of Excel, one workbook, & one worksheet

I have upgraded to the most recent service pack, no change before or after.

If anyone has any ideas, let me know.




--

Dave Peterson


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com