![]() |
need to use vba to refer that if a checkbox is checked.. the contents beside it will be copied to another range - to add to excel form
hi..
I have this as a starting point.. Basically when check box is clicked (sitting at i3) contents of j3:p3 is copied to the range starting at A10. This works... however... since j3:p3 is part of an advanced filter and thus could contain many rows... I need this to be able to work for every checkbox that is in that column AND the contents beside the checkbox copied over to the next available row after a10 as it is clicked. Whatever is clicked on.. I need to be able to add to the range a10 and if I unclick a checkbox, it will remove it from the A10 range again. My logic apparently has left for the weekend already.. so, I can't think of how to do this.. So, basically, Sub FormsSelectOrderClick() Dim myCBX3 As CheckBox Dim ranges ranges = "A10" Set myCBX3 = ActiveSheet.CheckBoxes(Application.Caller) With myCBX3.TopLeftCell If myCBX3.Value = xlOn Then Worksheets("Sheet1").range("j3:p3").Copy _ Destination:=Worksheets("Sheet1").range(ranges) Else .ClearContents End If End With End Sub Really, all I want .... if I am going about this all wrong.. Is to take records that appear obtained using advanced filter and be able to pick and choose which of those records I would like to add to an excel form.. and using some sort of indicator (such as a checkbox in column beside filtered fields) and on a command button click.. move those records to another area.. one after the other.. and then choose different records by performing another filter. and moving them over.. to the next available row. Thanks.. |
All times are GMT +1. The time now is 12:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com