Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default msoShapeRectangle -- Variable not defined ???

Hello,
I'm receiving the following error, in the code which already has worked

Set shp = ActiveSheet.Shapes.AddShape(msoShapeRectangle, 10, 10, 20, 20)

With shp
.Name = "abc"
.Fill.ForeColor.SchemeColor = 59
.Line.Weight = 0.25
.Line.ForeColor.SchemeColor = 22
End With

ERROR:
Compile Error: Variable not defined

and it's highlights < msoShapeRectangle ??????


Can anyone tell me how to correct the situation?

Any help will be appreciated

Linda

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default msoShapeRectangle -- Variable not defined ???

Hi Linda

I would suspect a due to a missing reference. Possibly due to the code being
run in an earlier Excel/Office version than the one it was compiled/saved
in.

Tools References, look for MISSING

Regards,
Peter T

"Linda Edlund" wrote in message
7...
Hello,
I'm receiving the following error, in the code which already has worked

Set shp = ActiveSheet.Shapes.AddShape(msoShapeRectangle, 10, 10, 20, 20)

With shp
.Name = "abc"
.Fill.ForeColor.SchemeColor = 59
.Line.Weight = 0.25
.Line.ForeColor.SchemeColor = 22
End With

ERROR:
Compile Error: Variable not defined

and it's highlights < msoShapeRectangle ??????


Can anyone tell me how to correct the situation?

Any help will be appreciated

Linda



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default msoShapeRectangle -- Variable not defined ???

Do you have a reference to the Office type library?

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Linda Edlund" wrote in message
7...
Hello,
I'm receiving the following error, in the code which already has worked

Set shp = ActiveSheet.Shapes.AddShape(msoShapeRectangle, 10, 10, 20, 20)

With shp
.Name = "abc"
.Fill.ForeColor.SchemeColor = 59
.Line.Weight = 0.25
.Line.ForeColor.SchemeColor = 22
End With

ERROR:
Compile Error: Variable not defined

and it's highlights < msoShapeRectangle ??????


Can anyone tell me how to correct the situation?

Any help will be appreciated

Linda



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default msoShapeRectangle -- Variable not defined ???

"Bob Phillips" wrote in
:

Do you have a reference to the Office type library?




The reference to the Office type library was on place, but I turned them
off and than on again and it works now so it was something there anyway.

Thanks a lot
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
msoShapeRectangle Andrew B[_4_] Excel Programming 2 April 5th 06 03:09 PM
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 4 May 12th 04 10:21 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


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

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"