+ Reply to Thread
Results 1 to 18 of 18

Showing preset Worksheets when Cmd Button clicked in user form

  1. #1
    Registered User
    Join Date
    06-14-2011
    Location
    galway
    MS-Off Ver
    Excel 2003
    Posts
    11

    Showing preset Worksheets when Cmd Button clicked in user form

    Hi All,

    New User back again asking for advice. RoyUK thankfully helped me out greatly today. The question I have now is what is the best way to get a command button to open up a pre defined worksheet that contains a jpeg. The result will be based on what is selected in the combo box.

    i.e. If I select Auditing report I would want, when the command button is clicked, the image I have created with a jpeg of the report to show on screen.

    Is there an easy way of doing this as I will probably have a different report to show for each of my combo box selections. Can I make the multiple reports on individual worksheets or would it just be easier for each selection to call a jpeg stored on the local computer.

    Any steering would be very much appreciated.

    Regards,

    Niall
    Last edited by niall4488; 06-15-2011 at 07:20 PM. Reason: SOLVED

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Showing preset Worksheets when Cmd Button clicked in user form

    Hi Niall

    I've done something similar to this in the past whereby the user would select an item and a related hyperlinked picture would display on the screen.

    I have all my pictures stored on the local machine in a folder called "Inventory Pictures"; within this folder, I have subfolders called "Kitchen", "Dining Room", "Living Room", etc, etc.. Within those subfolders lives the pictures for each of those rooms.

    I'd think my "Inventory Pictures" would relate to your "Report Pictures" and my individual rooms (eg: "Kitchen") would relate to your individual reports (eg: "BalanceReport").

    From your sample file, I'd assume you have .pdf files and/or .xls files assigned to each report. Let me know if my assumption is correct (or not).

    Building the files and then the hyperlinks takes a significant amount of up front work on your part. Are you interested?
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    06-14-2011
    Location
    galway
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Showing preset Worksheets when Cmd Button clicked in user form

    Hi John,

    Sounds exactly what I need. What I have done in the file attached is put an example report into a worksheet. So that when the report is selected in the combo box and the view report button is clicked the report will pop up showing the user the required report in relation to the report selected. I would then like some way of getting back to the selection screen.

    Your idea sounds perfect and really apprecaite the help.

    Regards,

    Niall

  4. #4
    Registered User
    Join Date
    06-14-2011
    Location
    galway
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Showing preset Worksheets when Cmd Button clicked in user form

    Hi John,

    New attachment is too big to upload here so I cant show the way I want it to run.

    Is there any other way I can show you what I have done?

    Thanks again,

    Niall

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Showing preset Worksheets when Cmd Button clicked in user form

    Hi Niall

    Try zipping the file then upload.

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Showing preset Worksheets when Cmd Button clicked in user form

    Why jpeds? Get some free pdf software , save reports as pdf into a special folder then open the report(pdf) from the userform
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  7. #7
    Registered User
    Join Date
    06-14-2011
    Location
    galway
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Showing preset Worksheets when Cmd Button clicked in user form

    Hi John,

    To be honest I'm running blind on this. So whatever you think would be the best option I am up for doing.

    I will go with the greater knowledge. The only reason I would add to a worksheet is that I need to add comment boxes to the report to show how the report wokrs for the customers I will be talking to.

    But as I said any idea would help.

    regards,

    Niall
    Attached Files Attached Files

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Showing preset Worksheets when Cmd Button clicked in user form

    Hi Niall

    Is this assumption correct?
    From your sample file, I'd assume you have .pdf files and/or .xls files assigned to each report. Let me know if my assumption is correct (or not).

  9. #9
    Registered User
    Join Date
    06-14-2011
    Location
    galway
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Showing preset Worksheets when Cmd Button clicked in user form

    Hi John,

    I would say yes John. As you will see from the zipped file I have a basic report on Report 1 Worksheet. If thats possible to use it would be great.

    If not then I would have to have pdf or xls for each one. The reason I would not have these on the local computer is that I am just trying to keep them all within the one area.

    I would have xls files assigned to each report but have nothing attached as of yet.

    I hope this explains it to you. I have define Report 1 to A2 report and would continue from there if possible.

    Thanks,

    Niall

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Showing preset Worksheets when Cmd Button clicked in user form

    Hi Niall

    Report1 Worksheet is blank. You do have an image of a report in UserForm1. This single image is what makes your file so large (2,000 KB for that image alone).

  11. #11
    Registered User
    Join Date
    06-14-2011
    Location
    galway
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Showing preset Worksheets when Cmd Button clicked in user form

    Hi John apologies,

    Please find attached, hopefully, the proper files.

    Thanks again,

    Niall

  12. #12
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Showing preset Worksheets when Cmd Button clicked in user form

    Hi Niall
    I'm attaching a file for you to play with to see if it's something you can work with. The report files are NOT included in the workbook as I believe that'll make your file huge.

    There's a button on ReportLookp sheet that'll create a folder called "Reports" in the same folder as the workbook resides. Within "Reports" folder, a sub folder will be created for each of your report names. Place your files in these sub folders (try two or three just for the exercise) then run your Report Lookup button. You'll get a screen that looks like this shot1.jpg Click on an item in the Report box and you'll get a screen like this shot2.jpg. Click on an item in the Output box and the file will open.

    I just noticed I didn't remove the View Report button. It's inactive and should have been removed. If this works for you, we can clean that up later. Let me know of issues.

    I forgot to mention, in the GetFilesMod, you'll need to change this
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by jaslake; 06-15-2011 at 04:54 PM.

  13. #13
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Showing preset Worksheets when Cmd Button clicked in user form

    Hi Niall...I see we were posting at about the same time...did you attach a new file? f so, to what post?

  14. #14
    Registered User
    Join Date
    06-14-2011
    Location
    galway
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Showing preset Worksheets when Cmd Button clicked in user form

    Hi John,

    Have awful broadband tonight and thought it was attached.

    Apologies.

    Niall
    Last edited by niall4488; 06-15-2011 at 07:24 PM.

  15. #15
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Showing preset Worksheets when Cmd Button clicked in user form

    Hi Naill

    I don't see this
    I have define Report 1 to A2 report
    How/where have you defined this?

  16. #16
    Registered User
    Join Date
    06-14-2011
    Location
    galway
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Showing preset Worksheets when Cmd Button clicked in user form

    John,

    Thank you so much for that it's working perfectly and greatly appreciate your teaching me tonight.

    Very much appreciated. Super work

    Regards,

    Niall

  17. #17
    Registered User
    Join Date
    06-14-2011
    Location
    galway
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Showing preset Worksheets when Cmd Button clicked in user form

    John,

    Thank you so much for that it's working perfectly and greatly appreciate your teaching me tonight.

    Very much appreciated. Super work

    Regards,

    Niall

  18. #18
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Showing preset Worksheets when Cmdr Button clicked in user form

    Hi Naill

    Right out of the box? Amazing! Glad it works for you. Play with it...let me know of issues. When you're satisfied, please mark your thread as solved.

+ 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