Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Option Button Value

I have a form that is called from a proceding form.
Before the form is called, I load listbox. I also want
set the enable property of a button on the form to FALSE
based on a option button value in a preceding form. The
code below is failing on the OptionButton2.Value = xlOn
line of the code. What is the proper syntax for an
Option BUtton value?

Sub WorkSheetSummary()
Dim ws As Worksheet

For Each ws In ThisWorkbook.Worksheets
If ws.Visible = True Then
WorkSheetSelectForm.ListBox1.AddItem (ws.Name)
End If
Next

If OptionButton2.Value = xlOn Then
ContinueButton.Enable = False
End If

WorkSheetSelectForm.Show

End Sub

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Option Button Value

Replaced

ContinueButton.Enable = False

With

Userform2.ContinueButton.Enable = False



-----Original Message-----
I have a form that is called from a proceding form.
Before the form is called, I load listbox. I also want
set the enable property of a button on the form to FALSE
based on a option button value in a preceding form. The
code below is failing on the OptionButton2.Value = xlOn
line of the code. What is the proper syntax for an
Option BUtton value?

Sub WorkSheetSummary()
Dim ws As Worksheet

For Each ws In ThisWorkbook.Worksheets
If ws.Visible = True Then
WorkSheetSelectForm.ListBox1.AddItem (ws.Name)
End If
Next

If OptionButton2.Value = xlOn Then
ContinueButton.Enable = False
End If

WorkSheetSelectForm.Show

End Sub

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
Option button Pat Rice New Users to Excel 4 October 31st 08 02:36 PM
Option Button Help PLEASE!! KB Excel Worksheet Functions 1 April 26th 06 06:21 AM
keep source formatting is not an option in paste option button Tina Excel Discussion (Misc queries) 0 February 20th 06 09:58 PM
Option Button Help justaguyfromky Excel Worksheet Functions 2 September 5th 05 10:28 PM
Option button chris_za_za Excel Programming 7 November 1st 04 01:04 PM


All times are GMT +1. The time now is 04:01 AM.

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"