Closed Thread
Results 1 to 8 of 8

Resize all charts on a worksheet.

  1. #1
    abhay_547
    Guest

    Resize all charts on a worksheet.

    Hi All,

    I have the below code which re-sizes all charts on a sheet with one's chart's size. I want to actually give the user a input option where user can enter the width and height in a inputbox and then macro will resize all charts on the sheet with the same size.

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    Thanks a lot for your help in advance.
    Last edited by romperstomper; 11-02-2010 at 06:06 AM. Reason: mark solved

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Resize all charts on a worksheet.

    Hi Abhay,

    You should be able to just change two lines of code:
    Please Login or Register  to view this content.
    The 100 and 75 will be the default entries, but you can certainly change that (that would actually make a pretty small chart). Error trapping code could (should) be added in case an invalid value is entered (e.g. nothing, or letters).

  3. #3
    abhay_547
    Guest

    Re: Resize all charts on a worksheet.

    Hi Paul,

    Thanks a lot for your reply, Can you please let me know if we can loop through all sheets and check if there are graphs existings in the same and if yes, then the macro should resize the charts as per the size entered by user. Please expedite.


    Thanks a lot for your help in advance.

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Resize all charts on a worksheet.

    You can probably just add a loop to go through each sheet in the workbook.
    Please Login or Register  to view this content.

  5. #5
    abhay_547
    Guest

    Re: Resize all charts on a worksheet.

    Hi Paul,

    Thanks a lot for your reply, the code is working fine but I still have an issue I want to resize all the charts on a sheet of the same size of which one chart's is on the same sheet. So I want to come up with macro which will show me the width and height of a active chart in a message. for e.g. if a user selects a chart on a worksheet and runs the above macro then it should show a message box displaying the height and width of the chart.

    Here is the code which I have so far which is not working at all.

    Please Login or Register  to view this content.
    Thanks a lot for your reply in advance.

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Resize all charts on a worksheet.

    Try:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  7. #7
    abhay_547
    Guest

    Re: Resize all charts on a worksheet.

    Hi romperstomper,

    Thanks a lot for your reply, It's working fine now.

  8. #8
    abhay_547
    Guest

    Re: Resize all charts on a worksheet.

    Hi All,

    I have the below macro which loops through all sheets in a workbook and resizes the charts in the each sheet as per the size entered by user but It doesn't show a msgbox with text "that it didn't find any chart on a particular sheet". I want to put some code that it will show that it didn't find the charts in which all sheets at last the macro run gets completed.

    Code to resize charts in multiple sheets:
    Please Login or Register  to view this content.
    Code to resize charts in activesheet:
    Please Login or Register  to view this content.
    Thanks a lot for your help in advance.
    Attached Files Attached Files
    Last edited by abhay_547; 11-03-2010 at 03:39 PM.

Closed 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