![]() |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 07:08 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com