+ Reply to Thread
Results 1 to 2 of 2

Need Help Creating a Macros that Opens PDF files according to Row/Column of Button

  1. #1
    Registered User
    Join Date
    04-28-2012
    Location
    Anaheim, CA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Need Help Creating a Macros that Opens PDF files according to Row/Column of Button

    I would like to create a macros to do the following -- When the user clicks on the "Lessons" button or the "Story" button, macros will detect which row and column the button is being clicked and opens the appropriate Lesson or Story.

    Basically, I created a pacing guide for my school for Kindergarten through 6th Grade (sorted by rows) starting from the first week of September 2012 to the second week of June 2013 (sorted by columns). I'd like to create buttons for each grade level and for each week that allow my teachers to just click and view the week's lesson plans for their grade level and the story that corresponds to these lesson plans.

    I set up something like this to test opening a PDF when the button was clicked. It worked, but I wanted to avoide writing a separate Macros for each button.

    Please Login or Register  to view this content.
    I feel like there should be a way to use an If..Then here.

    For example,

    If the command button being selected is in Row 34 (6th Grade) and Column D (Week 1) Then Open the 6th Grade's 1st Week Lesson Plans

    If the command button being selected is in Row 34 (6th Grade) and Column E (Week 2) Then Open the 6th Grade's 2nd Week Lesson Plans

    etc.

    I'm learning VBA programming, so any advice would help =) Thanks to those who post!
    Last edited by jgaines91732; 04-29-2012 at 02:21 AM.

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Need Help Creating a Macros that Opens PDF files according to Row/Column of Button

    Hello and welcome to the forum,

    Could you please upload a sample workbook for us to see your structure and how you want this to be coded? Also please use Code Tags (as per forum rules) around your vba code. Thanks.

    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    04-28-2012
    Location
    Anaheim, CA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Need Help Creating a Macros that Opens PDF files according to Row/Column of Button

    Here is the excel file I've been working on. I've positioned a number of buttons, but have the same code attached to each one for the time.

+ 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