Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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..


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
Checkbox checked then show more checkboxes Sara New Users to Excel 3 September 10th 08 07:16 PM
How to have Checkbox A uncheck with checked Checkbox B Texas Aggie Excel Discussion (Misc queries) 3 July 20th 07 10:58 PM
How do I give a checked checkbox a value in excel(as .5)? Paula Excel Worksheet Functions 1 March 5th 06 11:32 PM
Is checkbox is checked? Fred S Excel Discussion (Misc queries) 2 October 19th 05 03:53 AM
checkbox - default checked or un-checked barrfly Excel Programming 1 December 22nd 03 05:00 PM


All times are GMT +1. The time now is 06:35 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"