+ Reply to Thread
Results 1 to 5 of 5

macro save 1 plot every 2...

  1. #1
    Registered User
    Join Date
    05-13-2008
    Posts
    23

    macro save 1 plot every 2...

    Hi,
    I created a macro to plot a row of data from a worksheet in a chart. The macro scroll between rows of data one by one, and then save the chart as a new jpg. This is the relevant code:

    Please Login or Register  to view this content.
    The problem is that the macro save 1 chart every 2, not all of them as I need. I do not understand why as I sum only 1 in the do while loop. Any idea?

    thanks and cheers!
    pagheca

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    what causes the saved filename to change?
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    05-13-2008
    Posts
    23

    strFilename

    thanks for the speedy answer.
    the filename is changed by the line:

    Please Login or Register  to view this content.
    cheers,

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    no, the file name is read in by that line.

    What changes the contents of the cell B3?

  5. #5
    Registered User
    Join Date
    05-13-2008
    Posts
    23

    got it!

    the string was the name of the originating data file, but into each data file there were 2 lines of data! So, I was writing 2 charts into the same file...

    Excellent error-spotting! Thanks very much, Andy!!!
    cheers,

+ 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