ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Referencing check box names in VBE (https://www.excelbanter.com/excel-programming/347688-referencing-check-box-names-vbe.html)

jweasl

Referencing check box names in VBE
 
My checkbox's NAME value is EndCaps
By default it's ENABLED value is set to false. When i load my userform, if
cell b70, i want the enabled value to switch to true.
Here's what I've been trying.... don't laugh, i'm still new :-P
GutterOptions is my userform

Sub FabGutterMain()
If Range("B7").Value 0 Then EndCaps.Enabled = True
GutterOptions.Show

it keeps giving me an error saying "Object Required".
Help!

Rowan Drummond[_3_]

Referencing check box names in VBE
 
You need to qualify the reference to EndCaps eg:

Sub FabGutterMain()
If Range("B7").Value 0 Then _
GutterOptions.EndCaps.Enabled = True
GutterOptions.Show
End Sub

Hope this helps
Rowan

jweasl wrote:
My checkbox's NAME value is EndCaps
By default it's ENABLED value is set to false. When i load my userform, if
cell b70, i want the enabled value to switch to true.
Here's what I've been trying.... don't laugh, i'm still new :-P
GutterOptions is my userform

Sub FabGutterMain()
If Range("B7").Value 0 Then EndCaps.Enabled = True
GutterOptions.Show

it keeps giving me an error saying "Object Required".
Help!


Steve

Referencing check box names in VBE
 
You need to specify the form name that it is in:

Sub FabGutterMain()
If Range("B7").Value 0 Then yourFormName.EndCaps.Enabled = True
GutterOptions.Show


"jweasl" wrote in message
...
My checkbox's NAME value is EndCaps
By default it's ENABLED value is set to false. When i load my userform, if
cell b70, i want the enabled value to switch to true.
Here's what I've been trying.... don't laugh, i'm still new :-P
GutterOptions is my userform

Sub FabGutterMain()
If Range("B7").Value 0 Then EndCaps.Enabled = True
GutterOptions.Show

it keeps giving me an error saying "Object Required".
Help!




jweasl

Referencing check box names in VBE
 
Thanks a million! I figured it was simple, but being my first time I was
stumped.

"Rowan Drummond" wrote:

You need to qualify the reference to EndCaps eg:

Sub FabGutterMain()
If Range("B7").Value 0 Then _
GutterOptions.EndCaps.Enabled = True
GutterOptions.Show
End Sub

Hope this helps
Rowan

jweasl wrote:
My checkbox's NAME value is EndCaps
By default it's ENABLED value is set to false. When i load my userform, if
cell b70, i want the enabled value to switch to true.
Here's what I've been trying.... don't laugh, i'm still new :-P
GutterOptions is my userform

Sub FabGutterMain()
If Range("B7").Value 0 Then EndCaps.Enabled = True
GutterOptions.Show

it keeps giving me an error saying "Object Required".
Help!



Rowan Drummond[_3_]

Referencing check box names in VBE
 
You're welcome.

jweasl wrote:
Thanks a million! I figured it was simple, but being my first time I was
stumped.

"Rowan Drummond" wrote:


You need to qualify the reference to EndCaps eg:

Sub FabGutterMain()
If Range("B7").Value 0 Then _
GutterOptions.EndCaps.Enabled = True
GutterOptions.Show
End Sub

Hope this helps
Rowan

jweasl wrote:

My checkbox's NAME value is EndCaps
By default it's ENABLED value is set to false. When i load my userform, if
cell b70, i want the enabled value to switch to true.
Here's what I've been trying.... don't laugh, i'm still new :-P
GutterOptions is my userform

Sub FabGutterMain()
If Range("B7").Value 0 Then EndCaps.Enabled = True
GutterOptions.Show

it keeps giving me an error saying "Object Required".
Help!




All times are GMT +1. The time now is 05:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com