ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   [Q] msoShapeRectangle: variable not defined (https://www.excelbanter.com/excel-programming/298015-%5Bq%5D-msoshaperectangle-variable-not-defined.html)

Rolf Marvin Bøe Lindgren

[Q] msoShapeRectangle: variable not defined
 
I'm fairly new to drawing objects in Excel from VBA, and have stumbled
on a peculiar issue. the variable msoShapeRectangle, which apprarently
is suppoed to be predefined, is not declared.

I've recorded the following from Excel:

ActiveSheet.Shapes.AddShape(msoShapeRectangle, 303#, 48#, 255#,250.5)._
Select

compliation is aborted with the error message "msoShapeRectangle :
Variable not defined". if I don't set "Option Explicit" it compiles,
but the value of msoShapeRectangle is Empty.

any clues?

thank you,


--
Rolf Lindgren http://www.roffe.com/



All times are GMT +1. The time now is 12:04 PM.

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