Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Kaua Costa   on Dec 02 In MS Office Category.

  
Question Answered By: Huette Miller   on Dec 02

I took your suggestion and created a new user  form. Howveer, I ma
getting a compiler error now.
Here is what I did.

I have a simple form with a two option  buttons op1 and op2. Selecting
> op1 should execute  the following lines of code however, I am
getting an error Object variable or With block variable not set error.
> Do I need to declare any other variab;e/ form to avoid this.?
>
> Private Sub CommandButton1_Click()
> Dim plate As Boolean
> Load frm
> frm.Show
> plate = frm.op1.Value
>
> If plate = True Then
> LookAhead = 110
> Else
> LookAhead = 93
> End If
> End Sub
>
The line plate = frm.op1.Value is generating the error. I think it is
not correctly assigning the option box  value ie "True/False" to the
boolean variable plate.
Any inputs?

Share: 

 

This Question has 4 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Message box with user input Or get search suggestion and latest updates.


Tagged: