Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default [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. it is used in another
worksheet programmed by somebody else and it works perfectly there.

the variable msoTrue is also undefined.

this is Excel 10 (Excel 2002).

any clues?

thank you,


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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default [Q] msoShapeRectangle: variable not defined

"NickHK" writes:

Rolf,
It's from the Microsoft Office library, defined as a MsoAutoShapeType, with
value=1. Maybe you do not have a reference set to this library.


OK, but how do I establish such a referance? as stated, this works in
a workbook that's been made by somebody else - it's in the workbook
that I'm working on that it doesn't work.

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default [Q] msoShapeRectangle: variable not defined

"Rolf Marvin Bøe Lindgren" writes:

"NickHK" writes:

Rolf,
It's from the Microsoft Office library, defined as a MsoAutoShapeType, with
value=1. Maybe you do not have a reference set to this library.


OK, but how do I establish such a referance? as stated, this works in
a workbook that's been made by somebody else - it's in the workbook
that I'm working on that it doesn't work.


found it. Tools - References - ... lots of stuff.

thanks!

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default [Q] msoShapeRectangle: variable not defined

Rolf,
It's from the Microsoft Office library, defined as a MsoAutoShapeType, with
value=1. Maybe you do not have a reference set to this library.

Nick

"Rolf Marvin Bøe Lindgren" wrote in message
...
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. it is used in another
worksheet programmed by somebody else and it works perfectly there.

the variable msoTrue is also undefined.

this is Excel 10 (Excel 2002).

any clues?

thank you,


--
Rolf Lindgren

http://www.roffe.com/



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default [Q] msoShapeRectangle: variable not defined

Rolf,
VBA IDE, ToolsReferences. See the correct library.

NickHK

"Rolf Marvin Bøe Lindgren" wrote in message
...
"NickHK" writes:

Rolf,
It's from the Microsoft Office library, defined as a MsoAutoShapeType,

with
value=1. Maybe you do not have a reference set to this library.


OK, but how do I establish such a referance? as stated, this works in
a workbook that's been made by somebody else - it's in the workbook
that I'm working on that it doesn't work.

--
Rolf Lindgren

http://www.roffe.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Variable sum from defined input David Excel Worksheet Functions 7 March 10th 09 06:26 AM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
[Q] msoShapeRectangle: variable not defined Rolf Marvin Bøe Lindgren Excel Programming 0 May 12th 04 09:06 AM
[Q] msoShapeRectangle: variable not defined Rolf Marvin Bøe Lindgren Excel Programming 0 May 12th 04 09:00 AM
Variable Not Defined? objPivotCache BEE Excel Programming 1 December 15th 03 05:02 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"