Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Milo
 
Posts: n/a
Default can excel draw a shape based on values entered in cells

I want to draw a rectangle which is sized by measurements entered on a
different sheet
  #2   Report Post  
Fred
 
Posts: n/a
Default

Assuming you have a rectangle named "Rectangle 1" on worksheet 1, and
your size data is contained on worksheet 2, you could enter the
following code which would size the shape object upon clicking a
command button.

Private Sub cmdProcess_Click()

ActiveSheet.Shapes("rectangle 1").Width =
Worksheets("Sheet2").Range("a1")
ActiveSheet.Shapes("rectangle 1").Height =
Worksheets("Sheet2").Range("b1")

ActiveSheet.Shapes("rectangle 1").Left =
Worksheets("Sheet2").Range("c1")
ActiveSheet.Shapes("rectangle 1").Top =
Worksheets("Sheet2").Range("d1")

End Sub

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
Excel countif based on size of numbers in one column in Access Kristjan_Thor Excel Worksheet Functions 3 March 17th 05 11:21 PM
how do i get excel to automatically compute cell values talil Excel Discussion (Misc queries) 2 March 17th 05 05:49 PM
hitting spacebar in excel deletes last character entered. badgercat New Users to Excel 0 March 14th 05 10:47 PM
Missing values in Excel Line Chart mw55309 Charts and Charting in Excel 1 January 19th 05 01:10 PM
How do I easily draw in Excel the Upper and Lower limits of a con. Judy Charts and Charting in Excel 3 January 12th 05 10:21 AM


All times are GMT +1. The time now is 03:45 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"