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

Ok,
I truelly hope this is my last question for this project! Haaa!

I have two optin buttons:
*Snap peas
*Sno peas
How do i find the selected button and place the text in my database in
(iRow, 6)?
This is what I have thus far. Thank you so much in advance!! Jennifer
' copy the data to the database
ws.Cells(iRow, 1).Value = "=R[-1]C+1"
ws.Cells(iRow, 2).Value = Me.txtInvoice.Value
ws.Cells(iRow, 3).Value = Me.txtDate.Value
ws.Cells(iRow, 4).Value = Me.cboVend.Value
ws.Cells(iRow, 5).Value = Me.cboRan.Value
ws.Cells(iRow, 7).Value = Me.txtPallet.Value
ws.Cells(iRow, 8).Value = Me.txtQty.Value
ws.Cells(iRow, 10).Value = Me.txtRepakHrs.Value
ws.Cells(iRow, 11).Value = Me.txtRepakQty.Value
ws.Cells(iRow, 12).Value = "Purchase"
--
Though daily learning, I LOVE EXCEL!
Jennifer
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Option button

Try something like

If optSnapPeas.Value Then
ws.Cells(iRow,6).Value = "Snap Peas"
Else
ws.Cells(iRow,6).Value = "Sno Peas"
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Jennifer" wrote in message
...
Ok,
I truelly hope this is my last question for this project! Haaa!

I have two optin buttons:
*Snap peas
*Sno peas
How do i find the selected button and place the text in my
database in
(iRow, 6)?
This is what I have thus far. Thank you so much in advance!!
Jennifer
' copy the data to the database
ws.Cells(iRow, 1).Value = "=R[-1]C+1"
ws.Cells(iRow, 2).Value = Me.txtInvoice.Value
ws.Cells(iRow, 3).Value = Me.txtDate.Value
ws.Cells(iRow, 4).Value = Me.cboVend.Value
ws.Cells(iRow, 5).Value = Me.cboRan.Value
ws.Cells(iRow, 7).Value = Me.txtPallet.Value
ws.Cells(iRow, 8).Value = Me.txtQty.Value
ws.Cells(iRow, 10).Value = Me.txtRepakHrs.Value
ws.Cells(iRow, 11).Value = Me.txtRepakQty.Value
ws.Cells(iRow, 12).Value = "Purchase"
--
Though daily learning, I LOVE EXCEL!
Jennifer



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Option button

Assuming that the option buttons are linked, i.e. setting one unsets the
other, and that they are named optSnap and optSno, then

If Me.optSnap.Value Then
ws.Cells(iRow, 5).Value = Me.optSnap.Caption
Else
ws.Cells(iRow, 5).Value = Me.optSno.Caption
End If

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jennifer" wrote in message
...
Ok,
I truelly hope this is my last question for this project! Haaa!

I have two optin buttons:
*Snap peas
*Sno peas
How do i find the selected button and place the text in my database in
(iRow, 6)?
This is what I have thus far. Thank you so much in advance!! Jennifer
' copy the data to the database
ws.Cells(iRow, 1).Value = "=R[-1]C+1"
ws.Cells(iRow, 2).Value = Me.txtInvoice.Value
ws.Cells(iRow, 3).Value = Me.txtDate.Value
ws.Cells(iRow, 4).Value = Me.cboVend.Value
ws.Cells(iRow, 5).Value = Me.cboRan.Value
ws.Cells(iRow, 7).Value = Me.txtPallet.Value
ws.Cells(iRow, 8).Value = Me.txtQty.Value
ws.Cells(iRow, 10).Value = Me.txtRepakHrs.Value
ws.Cells(iRow, 11).Value = Me.txtRepakQty.Value
ws.Cells(iRow, 12).Value = "Purchase"
--
Though daily learning, I LOVE EXCEL!
Jennifer



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 385
Default Option button

Thanks guys! Jennifer

"Jennifer" wrote:

Ok,
I truelly hope this is my last question for this project! Haaa!

I have two optin buttons:
*Snap peas
*Sno peas
How do i find the selected button and place the text in my database in
(iRow, 6)?
This is what I have thus far. Thank you so much in advance!! Jennifer
' copy the data to the database
ws.Cells(iRow, 1).Value = "=R[-1]C+1"
ws.Cells(iRow, 2).Value = Me.txtInvoice.Value
ws.Cells(iRow, 3).Value = Me.txtDate.Value
ws.Cells(iRow, 4).Value = Me.cboVend.Value
ws.Cells(iRow, 5).Value = Me.cboRan.Value
ws.Cells(iRow, 7).Value = Me.txtPallet.Value
ws.Cells(iRow, 8).Value = Me.txtQty.Value
ws.Cells(iRow, 10).Value = Me.txtRepakHrs.Value
ws.Cells(iRow, 11).Value = Me.txtRepakQty.Value
ws.Cells(iRow, 12).Value = "Purchase"
--
Though daily learning, I LOVE EXCEL!
Jennifer

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
keep source formatting is not an option in paste option button Tina Excel Discussion (Misc queries) 0 February 20th 06 09:58 PM
Getting value of Option button BG Excel Worksheet Functions 2 September 27th 05 01:47 PM
Option button chris_za_za Excel Programming 7 November 1st 04 01:04 PM
When using an Option Button can I... phil[_2_] Excel Programming 3 August 5th 04 11:41 PM
value of option button paradise Excel Programming 1 September 30th 03 04:30 AM


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

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"