Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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
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
Creating a form with different size lines PurseGirl24 Excel Discussion (Misc queries) 3 January 26th 10 05:26 PM
How do I increase the font size when creating a drop down list? DATA VALIDATION LIST Excel Worksheet Functions 1 August 6th 08 04:52 PM
Graphs creating huge file size WBTKbeezy Excel Discussion (Misc queries) 4 February 20th 08 07:01 PM
Selecting area of unfixed size, creating borders paulold Excel Programming 2 April 12th 06 09:21 AM
Calculating negative time & creating scrol bars for fixed size txt box. Jonathan hill via OfficeKB.com Excel Discussion (Misc queries) 4 February 12th 05 02:08 AM


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