+ Reply to Thread
Results 1 to 11 of 11

Create a button to print a sheet

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-28-2004
    Location
    Tokyo
    MS-Off Ver
    Office 2016 pro plus
    Posts
    175

    Create a button to print a sheet

    I thought I solved it, but it was on a different workbook. I am not in pagebreak preview and it's not password protected. Why can't I insert an object to create to assign my macro?


    I updated attachment
    Attached Files Attached Files
    Last edited by skylinekiller; 01-12-2008 at 08:17 AM.

  2. #2
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Print Automation

    Hi


    Here is a small piece of code that hopefully will help

    Sub Print_roster()
    
    Dim a As Integer, lastrow As Integer
    Application.ScreenUpdating = False
    
    For a = 1 To 3
    Sheets(a).Select
    Let lastrow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    Range(Cells(1, 1), Cells(lastrow, 24)).PrintOut
    Next a
    Sheets(1).Select
    
    Application.ScreenUpdating = True
    End Sub
    Regards

    Jeff

  3. #3
    Forum Contributor
    Join Date
    04-28-2004
    Location
    Tokyo
    MS-Off Ver
    Office 2016 pro plus
    Posts
    175

    thanx Jeff, but

    Thank you, but what do I do with this? This is VB right? do I need to change any of the content within the code?

    I recorded a macro, but for some reason my illustrations tab does not highlight to enable me to select objects to create a button for my macro. It's not password protected, so I don't know what's going on. If I open a new work book, I can select the illustrations box.

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    Quote Originally Posted by skylinekiller
    Thank you, but what do I do with this? This is VB right? do I need to change any of the content within the code?

    I recorded a macro, but for some reason my illustrations tab does not highlight to enable me to select objects to create a button for my macro. It's not password protected, so I don't know what's going on. If I open a new work book, I can select the illustrations box.
    Go to view and select normal, right now you are in page break view

  5. #5
    Forum Contributor
    Join Date
    04-28-2004
    Location
    Tokyo
    MS-Off Ver
    Office 2016 pro plus
    Posts
    175

    thank you

    Thank you for everyone's help Problems solved.

  6. #6
    Forum Contributor
    Join Date
    04-28-2004
    Location
    Tokyo
    MS-Off Ver
    Office 2016 pro plus
    Posts
    175

    same problem with illustrations and inserting object

    I thought I solved it, but it was on a different workbook. I am not in pagebreak preview and it's not password protected. Why can't I insert an object to create to assign my macro?

  7. #7
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    Hi,
    Try going to tools, options, view, make sure show all is checked off,

  8. #8
    Forum Contributor
    Join Date
    04-28-2004
    Location
    Tokyo
    MS-Off Ver
    Office 2016 pro plus
    Posts
    175

    that worked. Thank you

    that worked. Thank you Iwill close this post. Thank you for your time and effort in helping me.

+ 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