Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating Same Size Box
Hey - in VBA you know how you can create boxes whether it be a texbox /
label box / check box etc etc I created about 10 checkboxes - is there a way to make them the same size w/o using copy and paste. Like highlight one box and make them the same size of that box? Let me know thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating Same Size Box
for checkboxes from the control toolbox toolbar located on a worksheet.
Sub sizecheckboxes() Dim cbox as MSForms.checkbox Dim cbox1 as MSForms.Checkbox Dim obj as OleObject set cbox = Worksheets.OleObjects("CheckBox1").Object for each obj in Activesheet.OleObjects if typeof obj.Object is MSforms.Checkbox then set cbox1 = obj.Ojbect if cbox1.name < cbox.Name then cbox1.Width = cbox.Width cbox1.Height = cbox.Height end if end if next end Sub -- Regards, Tom Ogilvy "RigasMinho" wrote: Hey - in VBA you know how you can create boxes whether it be a texbox / label box / check box etc etc I created about 10 checkboxes - is there a way to make them the same size w/o using copy and paste. Like highlight one box and make them the same size of that box? Let me know thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating Same Size Box
man that sucks - you have to program in command to do this?
this really sucks But thanks Tom Ogilvy wrote: for checkboxes from the control toolbox toolbar located on a worksheet. Sub sizecheckboxes() Dim cbox as MSForms.checkbox Dim cbox1 as MSForms.Checkbox Dim obj as OleObject set cbox = Worksheets.OleObjects("CheckBox1").Object for each obj in Activesheet.OleObjects if typeof obj.Object is MSforms.Checkbox then set cbox1 = obj.Ojbect if cbox1.name < cbox.Name then cbox1.Width = cbox.Width cbox1.Height = cbox.Height end if end if next end Sub -- Regards, Tom Ogilvy "RigasMinho" wrote: Hey - in VBA you know how you can create boxes whether it be a texbox / label box / check box etc etc I created about 10 checkboxes - is there a way to make them the same size w/o using copy and paste. Like highlight one box and make them the same size of that box? Let me know thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating Same Size Box
then why wouldn't you just copy all from the same master box.
-- Regards, Tom Ogilvy "RigasMinho" wrote: man that sucks - you have to program in command to do this? this really sucks But thanks Tom Ogilvy wrote: for checkboxes from the control toolbox toolbar located on a worksheet. Sub sizecheckboxes() Dim cbox as MSForms.checkbox Dim cbox1 as MSForms.Checkbox Dim obj as OleObject set cbox = Worksheets.OleObjects("CheckBox1").Object for each obj in Activesheet.OleObjects if typeof obj.Object is MSforms.Checkbox then set cbox1 = obj.Ojbect if cbox1.name < cbox.Name then cbox1.Width = cbox.Width cbox1.Height = cbox.Height end if end if next end Sub -- Regards, Tom Ogilvy "RigasMinho" wrote: Hey - in VBA you know how you can create boxes whether it be a texbox / label box / check box etc etc I created about 10 checkboxes - is there a way to make them the same size w/o using copy and paste. Like highlight one box and make them the same size of that box? Let me know thanks |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating Same Size Box
Cause i'm weird like that :-)
In reality in VB you can set a box and use that as a control and then resize boxes that way. I thought VBA would have the same functionality. Oh well Tom Ogilvy wrote: then why wouldn't you just copy all from the same master box. -- Regards, Tom Ogilvy "RigasMinho" wrote: man that sucks - you have to program in command to do this? this really sucks But thanks Tom Ogilvy wrote: for checkboxes from the control toolbox toolbar located on a worksheet. Sub sizecheckboxes() Dim cbox as MSForms.checkbox Dim cbox1 as MSForms.Checkbox Dim obj as OleObject set cbox = Worksheets.OleObjects("CheckBox1").Object for each obj in Activesheet.OleObjects if typeof obj.Object is MSforms.Checkbox then set cbox1 = obj.Ojbect if cbox1.name < cbox.Name then cbox1.Width = cbox.Width cbox1.Height = cbox.Height end if end if next end Sub -- Regards, Tom Ogilvy "RigasMinho" wrote: Hey - in VBA you know how you can create boxes whether it be a texbox / label box / check box etc etc I created about 10 checkboxes - is there a way to make them the same size w/o using copy and paste. Like highlight one box and make them the same size of that box? Let me know thanks |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating Same Size Box
If these are on a worksheet, select the controls you wish to resize,
right-click one of them Format ControlSize, enter the desired dimensions. If you talking about on a userform, same as VB6. NickHK "RigasMinho" wrote in message oups.com... Hey - in VBA you know how you can create boxes whether it be a texbox / label box / check box etc etc I created about 10 checkboxes - is there a way to make them the same size w/o using copy and paste. Like highlight one box and make them the same size of that box? Let me know thanks |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating Same Size Box
THANKS this is what i needed :-)
NickHK wrote: If these are on a worksheet, select the controls you wish to resize, right-click one of them Format ControlSize, enter the desired dimensions. If you talking about on a userform, same as VB6. NickHK "RigasMinho" wrote in message oups.com... Hey - in VBA you know how you can create boxes whether it be a texbox / label box / check box etc etc I created about 10 checkboxes - is there a way to make them the same size w/o using copy and paste. Like highlight one box and make them the same size of that box? Let me know thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating a form with different size lines | Excel Discussion (Misc queries) | |||
How do I increase the font size when creating a drop down list? | Excel Worksheet Functions | |||
Graphs creating huge file size | Excel Discussion (Misc queries) | |||
Selecting area of unfixed size, creating borders | Excel Programming | |||
Calculating negative time & creating scrol bars for fixed size txt box. | Excel Discussion (Misc queries) |