Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Excel > Excel Programming

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 04-17-2019, 04:36 AM
Carol Gomez Carol Gomez is offline Windows 10 Office 2019
Novice
 
Join Date: Apr 2019
Posts: 1
Carol Gomez is on a distinguished road
Default Call info from the worksheet to create shapes in VBA

Hi,

I'm trying to write a code to automatically insert forms (rectagles) into my worksheet. I have over 200 entries to make with different sizes and names. I need the names to recognize which box this infomation corresponds to.

EX
Box W X H
AAAA 3.5 cm 2,05 cm
AAAB 2,4 cm 2,08 cm
.... .... .......

here the code I have till now:

Sub ShapeRectangle()
Set myDocument = Worksheets(1)
With myDocument.Shapes.AddShape(msoShapeRectangle, _
144, 144, 72, 72)
.Name = "Red Square"
.Fill.ForeColor.RGB = RGB(255, 0, 0)
.Line.DashStyle = msoLineDashDot
End With
End Sub



where to add a dynamic code to call the info from the worksheet?

thank you in advance for your answer!
best,

Carol
Reply With Quote
Reply

Tags
#addshapes

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using VBA Macros to Create Shapes with Text mandersen04 Excel Programming 2 01-27-2019 10:52 AM
Generating / exporting a report summarizing info in a worksheet paulkaye Excel Programming 3 05-29-2018 01:27 PM
Managing shapes in a WorkSheet ? ksor Excel Programming 3 02-15-2018 10:09 AM
Loop through worksheet range to show / hide shapes. wlcdo2 Excel Programming 2 02-22-2017 05:10 PM
Trying to create a "roll call" ppt tommy33d PowerPoint 0 10-22-2014 03:02 PM


All times are GMT -7. The time now is 09:10 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft