Consulting

Results 1 to 2 of 2

Thread: Access form to Excel Checkbox

  1. #1

    Access form to Excel Checkbox

    I created my checkboxes by looping but then how can i retrieve back my checkbox true or false by looping ?

    [VBA] Set chk = .Checkboxes.Add(g, e, 80, 10)
    chk.Text = d
    chk.Name = "Q" & h & "chkbox" & chkbox & "Ans" & An

    g = g + 50
    chkbox = chkbox + 1
    [/VBA]
    Last edited by geekgirlau; 09-19-2005 at 02:50 AM. Reason: Add VBA tags

  2. #2
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    Hi Zoro,

    It's hard to work out from your code exactly what your naming convention is because we can't see the value of most of your variables. However you can loop through the checkboxes either by number (for example ".Checkboxes(1)") or by name (for example ".Controls("myCheckboxname")" - the loop will work depending on your naming convention).

    Can you provide an example of the names of the checkboxes?

    I've also edited your post to make your code a bit easier to read - when you post code, select the text then click on the "VBA" button for format it correctly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •