Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Object error on an Option Button

Hello

I have a userform with a multipage control with textboxes and a frame
containing an optionbox. The code for the option box is

If frmAddPayments.OptionButton1.Value = True Then
Sheets("payments").txtTax.Value = "Includes"
ElseIf frmAddPayments.OptionButton2.Value = True Then
txtTax.Value = "Excludes"
Else
txtTax.Value = "Non Taxable"
End If
What I am trying to do is to fill a cell with include exclude or Non
Taxable.
I use the DIM txtTax, txtType to declare the variables in the form
initialise statement.

I get the error object required. How do i refer to this and am I doing
it right?
garry

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Object error on an Option Button

Is txtTav a textbox on the worksheet or are you trying to get at the textbox
on the form? If the latter, not uses a Sheets qualifier, use Me.

--

HTH

RP

"Garry" wrote in message
...
Hello

I have a userform with a multipage control with textboxes and a frame
containing an optionbox. The code for the option box is

If frmAddPayments.OptionButton1.Value = True Then
Sheets("payments").txtTax.Value = "Includes"
ElseIf frmAddPayments.OptionButton2.Value = True Then
txtTax.Value = "Excludes"
Else
txtTax.Value = "Non Taxable"
End If
What I am trying to do is to fill a cell with include exclude or Non
Taxable.
I use the DIM txtTax, txtType to declare the variables in the form
initialise statement.

I get the error object required. How do i refer to this and am I doing
it right?
garry

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Object error on an Option Button

The txtTax is supposed to be a variable that I can use to set a cell to
a value. ie x=5 or x=true then put that into a cell.

I am new to this so don't assume anything and you can be as blunt as you
like as long as I get this working <g.

tx

garry

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Object Variable Not Set Error on Selection object Jean Excel Worksheet Functions 3 July 24th 06 06:45 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
conditional error for option button tjb Excel Worksheet Functions 3 December 29th 04 11:26 PM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM


All times are GMT +1. The time now is 10:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"