+ Reply to Thread
Results 1 to 3 of 3

macro for checkboxes please fix my code

Hybrid View

  1. #1
    Registered User
    Join Date
    02-03-2009
    Location
    Upstate New York
    MS-Off Ver
    Excel 2003
    Posts
    31

    macro for checkboxes please fix my code

    Hi,

    I did some search and couldnt get the help I needed.

    The following code attempt is in a userform with one print button, one cancel button and six checkboxes refering to which sheets that are needed to print.

    Please help, THANKS

    private sub cancelprint_click()
    unload me
    end
    
    private sub printdeal_click()
    
    application screenupdating = False
    
    if CheckBox1.value = True then sheets("dealsheet").printout copies:= 1
    if CheckBox2.value = True then sheets("trade").printout copies:= 2
    if CheckBox3.value = True then sheets("payoff").printout copies:= 1
    if CheckBox4.value = True then sheets("stips").printout copies:= 1
    if CheckBox5.value = True then sheets("businessmgr").printout copies:= 1
    if CheckBox6.value = True then sheets("cc").printout copies:= 1
    
    application screenupdating = False
    
    end sub
    Last edited by Ceeseven; 05-16-2009 at 01:42 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: macro for checkboxes please fix my code

    Code looks fine to me. Post a workbook.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    02-03-2009
    Location
    Upstate New York
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: macro for checkboxes please fix my code

    thanks

    I forgot the "dot" in application.screenupdating

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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