+ Reply to Thread
Results 1 to 4 of 4

need a piece of code to send print command

  1. #1
    Registered User
    Join Date
    08-01-2011
    Location
    quetta
    MS-Off Ver
    Excel 2007
    Posts
    13

    need a piece of code to send print command

    The code :
    Sub Count()
    With ActiveSheet.Range("A1")
    .Value = .Value + 1
    If .Value >= 10 Then Exit Sub 'limit
    End With
    Application.OnTime Now + TimeValue("00:00:02"), "Count" 'every 2 seconds
    End Sub


    generates increasing numbers till the last given limit.
    and now
    may i have a piece of code to add into this one, by which the sheet get printed after every increase.
    for example
    A1= 1 =print
    A1= 2 = print
    and so on

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: need a piece of code to send print command

    activesheet.printout.


    Things that are simple functions of Excel, just record yourself doing it through the menus, then look at the code, will be quicker than posting.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: need a piece of code to send print command

    When you joined the forum recently you agreed to abide by the Forum Rules, but in haste I fear you might not have actually read them. Please stop and take a moment to read them now. We all follow these rules for the benefit of all, as must you. Thanks.

    (link above in the menu bar)

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    And

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  4. #4
    Registered User
    Join Date
    08-01-2011
    Location
    quetta
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: need a piece of code to send print command

    Sorry for this , this was happened by misunderstanding.

+ 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. several handlers with same piece of code
    By Lberteh in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-16-2013, 10:41 AM
  2. [SOLVED] Need help to add a VBA piece to the code.
    By avid2xl in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-01-2013, 04:54 AM
  3. What does this piece of code do?
    By hawkinsr86 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-20-2013, 11:50 AM
  4. Missing piece of code
    By jimmckay in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-02-2012, 03:53 PM
  5. [SOLVED] Print Setup VBA code behind a command button
    By boldcode in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2011, 02:04 PM

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