+ Reply to Thread
Results 1 to 9 of 9

Access Excel VBA Control

  1. #1
    Registered User
    Join Date
    07-12-2008
    Location
    China
    Posts
    4

    Access Excel VBA Control

    Dear All,

    Do anyone know how to access excel check box control? I have several Check box control in a sheet, both of them are named at "Check Box 1".... "Check Box N", how can i check the check box by VBA program? Can anyone suggest someway to check the bulk of check box smartly?

    Thank a lot who reply the post, any suggestion would be appreciated.

    Best Regards
    andrew
    Last edited by VBA Noob; 09-03-2008 at 02:52 AM.

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    Please can you tell if you use userform checkbox or the checkbox is in the sheet (and in this case where you selected it, in the Visual basic tooldbar or in module toolbar)?
    Thanks.

    Regards,
    Antonio

  3. #3
    Registered User
    Join Date
    07-12-2008
    Location
    China
    Posts
    4
    the checkbox is in the worksheet, it is added by dropping from Excel->Form tool bar. Could you please help? thanks a lot.

  4. #4
    Registered User
    Join Date
    07-12-2008
    Location
    China
    Posts
    4
    i have recorded marco, it show the following code:
    Please Login or Register  to view this content.
    However, it is not work for second time running, it show that selection is nothing, what can i do now? thx a lot.
    Last edited by royUK; 09-03-2008 at 03:51 AM.

  5. #5
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    You can try with this code but may exist another method to avoid to select each object:
    Please Login or Register  to view this content.
    Regards,
    Antonio

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Quote Originally Posted by Andrew Chan View Post
    i have recorded marco, it show the following code:

    xlWS.Shapes("Check Box 1").Select

    With Selection
    .value = xlOn
    .LinkedCell = ""
    .Display3DShading = False
    End With

    However, it is not work for second time running, it show that selection is nothing, what can i do now? thx a lot.
    Andrew please read the Forum Rules & use Code Tags in future.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  7. #7
    Registered User
    Join Date
    07-12-2008
    Location
    China
    Posts
    4
    Dear Antonio,

    This code runs successfully, thank a lot.

    Best Regards
    andrew

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Quote Originally Posted by Andrew Chan View Post
    Dear Antonio,

    This code runs successfully, thank a lot.

    Best Regards
    andrew
    Have you read the Forum Rules? An acknowledgement concerning myt previous post would be in order!

  9. #9
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Andrew Chan,

    Here is a simpler way. The Active Sheet contains a collection of the Forms Check Boxes in a collection object called CheckBoxes.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Copy or Export an Access Query results back to Excel
    By MACRE0 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-18-2008, 01:07 PM
  2. Excel Auto Filter in MS Access?
    By VegasL in forum Excel General
    Replies: 0
    Last Post: 08-08-2008, 12:19 PM
  3. Using Excel Data to Populate an Access Table
    By chrismann85 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2008, 04:27 PM
  4. Linking an Access Database with Excel
    By chrismann85 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-08-2008, 01:35 PM
  5. Visual Basic Between Excel and Access
    By NewTubaBoy in forum Excel General
    Replies: 9
    Last Post: 12-27-2006, 11:12 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1