#1
|
|||
|
|||
copy checkbox string and paste it in excel sheet
Hi Everyone,
I have checkboxes on vba form and a Sheet as "Sheet3". What I want is, when the user checks any of the checkbox on form I want to copy that string and paste it in column A of Sheet3 and column B should be marked as "X" I am using the below code but it fails Code:
For Each ctl In frmEqpDetails.MultiPage1.Pages(0).Controls If ctl.Value = True Then Sheets("Testing_Sheet").Find(test_info(eqp_count - 1).vis_tests(looper), LookIn:=xlValues) = "X" End If looper = looper + 1 Next Please advise. |
#2
|
||||
|
||||
You have not provided enough information - how does this code fail?
|
#3
|
|||
|
|||
Check boxes are boolean not string type.
Can you elaborate? |
#4
|
|||
|
|||
I have a sheet as "Sheet1" which have test_names in column A.
Equipment Finishing (painting, scratches, damage, etc) Equipment Alignment (doors, removable panels/covers, locks, section-to section, etc) Equipment / Device Labels/Nameplates and Component Layout Torque Marking Component / Device Inspection (damage to parts, missing screws, etc) and so on .... I displaced this test in a form of checkboxes in userform. There is a copy of this same sheet in the same workbook with sheetname "Testing_Sheet". Now what I want is, when the user checks any of the checkboxes in userform, an "X" should be placed in "Testing_Sheet" in column B. Please find the attachment for better understanding and please advice me. |
#5
|
|||
|
|||
Try this using F8 to step through the code and see where you would be putting the "X"
Code:
Sheets("Testing_Sheet").Cells.Find(test_info(eqp_count - 1).vis_tests(looper), LookIn:=xlValues).Select |
#6
|
|||
|
|||
Hi,
Thanks a lot. Its working. The only minor problem is that I want to put "X" in column B but its getting placed in column A. How can I define column B in the following code. The following code worked properly. Code:
Sheets("Testing_Sheet").Cells.Find(test_info(eqp_count - 1).vis_tests(looper), LookIn:=xlValues) = "X" |
#7
|
|||
|
|||
from my previous post
you'll need to be including an Offset to position the "X" Obviously you prefer fish to fishing. |
#8
|
|||
|
|||
Thanks,
It worked. Code:
Sheets("Testing_Sheet").Cells.Find(test_info(eqp_count - 1).vis_tests(looper), LookIn:=xlValues).Offset(, 1) = "X" |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel copy two numbers between specific column and paste in next sheet | visha_1984 | Excel | 1 | 12-26-2014 07:59 PM |
Want to change Macro to copy and paste data to new sheet | Vortex69 | Excel Programming | 0 | 12-23-2014 09:53 PM |
Find Results in excel copy the rows to another sheet | khalidfazeli | Excel | 2 | 02-06-2013 09:38 AM |
How to Copy data from Outlook mail and Paste it in a Excel sheet? | padhu1989 | Outlook | 0 | 09-11-2012 04:07 AM |
Word - Calculate and paste values from Excel sheet | Augf87 | Word | 1 | 07-06-2009 10:26 AM |