Consulting

Results 1 to 2 of 2

Thread: Tile pictures on a worksheet & "Save As" option

  1. #1

    Tile pictures on a worksheet & "Save As" option

    Hello All,

    I have been working on an Excel VBA tool for a few months now that queries a database based on groups/filters the user specifies and then builds custom reports and charts from that data.

    I am building the report and making custom charts, but I want to be able to tile the charts on a page. Currently when I build a chart I have the chart show up on a worksheet page and a button that allows the user to copy the chart as a picture to a different worksheet. The idea is that the user can build as many custom charts as they want and add the good ones to a collection to save or print later on.

    My question is, is it possible to easily tile these charts (or I guess by this time they are just pictures) on a worksheet? I plan on having approx. 4 to a landscape worksheet.

    Additionally, I have found out how to use the saveAs function in excel VBA and have it prompting the user for a filename using an inputBox but I wanted to know if I can write the code to where when the user clicks a save button it will bring up the regular "save as" window and only save that sheet?

    thanks for your time!

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Do you know the names of these pictures? If so, you can just access them via the Shapes collection, which has a Left and a Top Property.

    As to the SaveAs, you can use GetSaveAsFilename to get the user to supply a filename, and then just do a Copy of the sheet, which creates a new workbook, and save that

    [vba]

    Activesheet.Copy
    Activeworkbook.SaveAs that_filename
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •