+ Reply to Thread
Results 1 to 4 of 4

Help with printing macro

  1. #1
    Registered User
    Join Date
    09-10-2014
    Location
    Leighton Buzzard
    MS-Off Ver
    Excel 2010
    Posts
    2

    Help with printing macro

    Hi
    I need some help with a macro I currently have. I have 2 sheets - one with the data and one with the summary (which summariuses the data from the other sheet). I have a print macro but wanted to modify this for a particular range of cells.

    I am a beginning so would be grateful for any help

    This is what I have:
    Sub Print_statement()

    ' Print_list Macro
    ' Macro recorded 29/09/2011 by Tor 164
    '
    Dim ws As Worksheet
    Dim i As Long

    Set ws = Sheets("2013-2014 Benefit choices")

    For i = 1 To ws.Cells(Rows.Count, "C").End(xlUp).Row
    With Sheets("stmnt")
    .Range("C3").Value = ws.Cells(i, "C").Value
    .PrintPreview '
    End With
    Next i


    End Sub

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Help with printing macro

    Hi, Tor164,

    please wrap your procedure with code.tags like requested in Forum Rule #3 and tell us about the range: will it influence the area to which is posted or just limit the area from Sheet "2013-2014 Benefit choices"?

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    09-10-2014
    Location
    Leighton Buzzard
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Help with printing macro

    Hi Holger
    Many thanks for replying to this. I think I hust want to limit the area from Sheet "2013-2014" so it only picks up rows 1 through to 100 for example.

    I hope this makes sense. I think I have put the code correctly underneath

    Tor

    Please Login or Register  to view this content.

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Help with printing macro

    Hi, Tor,

    I thought of adding tags to the opening post...

    Maybe like this:
    Please Login or Register  to view this content.
    Ciao,
    Holger

+ 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. [SOLVED] Macro for auto printing. macro printing at same time 17:30 but do not repeat.
    By aburger in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-23-2013, 09:16 AM
  2. Disabling Printing ability of a sheet unless printing from a macro
    By cadamhill in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2012, 04:41 AM
  3. Macro for printing
    By cyee in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-19-2010, 01:37 AM
  4. Macro for printing
    By hero96559 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-12-2009, 12:35 PM
  5. Printing Macro-How can I make my print macro force excel
    By chris_mayer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-20-2006, 09:26 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