ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CheckBox value to worksheet (https://www.excelbanter.com/excel-programming/301340-checkbox-value-worksheet.html)

Patrick Simonds

CheckBox value to worksheet
 
I have one CheckBox on my user form, if it is checked I want the Value Yes
(or No if the CheckBox is not selected) to go into the active row column 2
(using something like rng(1, 2).Value = ???). My macro already sets the
current row as active, I just do not know how to code this.



mark

CheckBox value to worksheet
 
Hi,
If your are in the target cell:

activecell.offset(0,0).select
'put it in column B of the current row
activecell.offset(0,1).value=whatever

-----Original Message-----
I have one CheckBox on my user form, if it is checked I

want the Value Yes
(or No if the CheckBox is not selected) to go into the

active row column 2
(using something like rng(1, 2).Value = ???). My macro

already sets the
current row as active, I just do not know how to code

this.


.


Tom Ogilvy

CheckBox value to worksheet
 
Mark assumed that column A would be the active cell

Cells(activeCell.row,2).Value = iif(checkbox1.value,"Yes","No")


might be more robust.

--
Regards,
Tom Ogilvy

"Patrick Simonds" wrote in message
...
I have one CheckBox on my user form, if it is checked I want the Value Yes
(or No if the CheckBox is not selected) to go into the active row column 2
(using something like rng(1, 2).Value = ???). My macro already sets the
current row as active, I just do not know how to code this.






All times are GMT +1. The time now is 09:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com