Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the height and width of a control VBA

Status
Not open for further replies.

MfgEngDave

Industrial
Joined
Jul 14, 2010
Messages
13
Location
US
Ok so heres my txt in VBA for excel:

Private Sub EModelViewControl1_OnComponentSelectionNotify(ByVal ComponentName As String, ByVal XCoordinate As Long, ByVal YCoordinate As Long)

End Sub

how do I make the height and width a certain number of cells? For example If I wanted the control to open in B7:L44 cells what would it say here?
 
Say you wanted a width of 15 and a height of 50
Code:
    Columns("B:L").ColumnWidth = 15
    Rows("7:44").RowHeight = 50
 
For most things in Excel, start a macro recording, do whatever you need to do, stop recording and look at the macro generated. You can then optimize the code.
 
What is an EModelViewControl?
 
Thank you xwb,

cowski,
It embeds Edrawings into Excel, I use it for my setup sheets. So what I do is I have a template with this embeded and it looks to a cell to populate the file extension. So when I make an edrawing I use a naming convention to name it and I file it in a vault. Then I make the setup sheet, the setup sheet automaticly populates the edrawing. So in the future when something is changed on the edrawing( like a note is added) the setup sheet automaticlly updates without needing to sign it out and all that jazz. This also keeps everything in one window so they arnt poping back and forth between two programs to see a setup sheet and a 3d model.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top