This is my first time to atempt anyting like this but would like to create 
a Vessel Calendar that will take a set of values from a table and then draw 
pentagons on a worksheet to represent the vessels on a calendar.  The end 
Calendar will look something like this, which we do manual now. Also 
attatched.
 
 
 

<https://lh5.googleusercontent.com/-_3v3NUR26Zg/UBTBnwj1zUI/AAAAAAAAACk/IMIdsYmSgS4/s1600/snap00024.jpg>
 
I have attached the Vessel Data and would like to use it to draw soemthing 
similar to that Picture above to visually draw a Calendar of when Vessels 
are coming and going.  I have been playing with VBA below but have been 
unsucessfull in a few things and would apprecaite any help.
 
1,) Need a way to loop (For statment?) through and draw the shape for each 
entry in the table.  I figure that 6.5 points is about equal to an hour on 
the sheet to determine height, Length should take the size of the berth, 
Shape will always be a 51.
2.) Need a method in which to add text to the second line of the 
TextFrame.Characters.Text object.
3.) My Integer HoursNeeded is notworking for 
 
 
Thanks for any comments or help.
 

Private Sub cmdCreateAutoshapes_Click()
    Dim shp As Shape
    Dim DataSheet As Worksheet
    Dim HoursNeeded As Integer
    
    Set DataSheet = ThisWorkbook.Sheets("Data")
    Set HoursNeeded = DataSheet.Cells(5, 8)
    
    If ActiveSheet.Shapes.Count > 2 Then
        DeleteAllAutoShapes
    End If
        
Set shp = ActiveSheet.Shapes.AddShape(51, 120, 135, 240, HoursNeeded)
        shp.TextFrame.Characters.Text = DataSheet.Cells(5, 2)
    
End Sub

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com


Attachment: Vessel_Data.xlsx
Description: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Attachment: Vessel_Calendar.xlsx
Description: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Reply via email to