View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JH JH is offline
external usenet poster
 
Posts: 64
Default disable option button on user form

Hi,
I added this line to my macro. " frmMenu.opt1.Enabled = false", I got
an error message, "Object required". The macro is located in another
workbook. I am intended to use this macro to loop through all the workbooks
that needed changes.
The code is as follow:

................................
fname = Dir(pname, vbNormal)
Do
If Len(fname) < 28 Then

Workbooks.Open FileName:=pname & fname, UpdateLinks:=False
frmMenu.opt1.Enabled = False
Workbooks(fname).Close saveChanges:=True
End If
fname = Dir() 'get another filename
Loop Until fname = ""
----------------------------------------------
Thanks!
JH

"Jacob Skaria" wrote:

OptionButton1.Enabled = False

If this post helps click Yes
---------------
Jacob Skaria


"JH" wrote:

I have a large number of workbooks with an user form, the user form shows up
when the workbook is open. I am trying to disable one of the option buttons
on the user form. How can I do it programmatically?
Thanks!

JH