Consulting

Results 1 to 7 of 7

Thread: Web Query To Jpeg w/external VBA/VBScript Code

  1. #1
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location

    Web Query To Jpeg w/external VBA/VBScript Code

    I have created a .wsc script which creates a new Excel Object, adds a workbook, clears gridlines, performs a web query and deletes hyperlinks (see attached). The result can be saved to a file, but I have been requested to keep the Application.visible = False, and export the used range to a jpeg.

    I assume that means pasting the usedrange into a Chart Object then exporting the chart as .jpg... and I thought I had code that did just that...

    But I'm brain dead....

    Stan

  2. #2
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    Figured it out.

  3. #3
    VBAX Mentor XL-Dennis's Avatar
    Joined
    May 2004
    Location
    ?stersund, Sweden
    Posts
    499
    Location
    Stan,

    The following will give some info about (as a future reference )

    http://www.mvps.org/dmcritchie/excel/xl2gif.htm

    Kind regards,
    Dennis
    Kind regards,
    Dennis

    ExcelKB | .NET & Excel | 2nd edition PED


  4. #4
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    Thank you Dennis;

    My initial confusion was with requirement for explicit references which macros don't require. Increasingly I have requests for Excel workbooks, but free of macro code. I find .wsc files incredibly useful as vba code ports about 90% and you can include jscript. In this particular example, the user decides whether they want a workbook or a jpeg, either of which is attached to an email - Excel is essentially middleware.

    Stan

  5. #5
    VBAX Mentor XL-Dennis's Avatar
    Joined
    May 2004
    Location
    ?stersund, Sweden
    Posts
    499
    Location
    I find .wsc files incredibly useful as vba code ports about 90% and you can include jscript.
    Hi Stan,

    Sounds interesting and I'm wondering if You would like to share it with us

    Take care,
    Dennis
    Kind regards,
    Dennis

    ExcelKB | .NET & Excel | 2nd edition PED


  6. #6
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    Dennis,

    Actually, I've compiled the 'script' in a 3rd party product Winbatch, and have begun a tutorial for that newsgroup. Generally, 95% of VBA code can be used in Winbatch, with the major caveat of External references, viz. cannot use ThisWorkbook. or Me.

    As this is strictly a VBA forum, posting either .wsc or Winbatch code would be foreign - I may try it at WillR's blog.

    Stan

  7. #7
    VBAX Mentor XL-Dennis's Avatar
    Joined
    May 2004
    Location
    ?stersund, Sweden
    Posts
    499
    Location
    Stan - Thanks my friend

    Kind regards,
    Dennis
    Kind regards,
    Dennis

    ExcelKB | .NET & Excel | 2nd edition PED


Posting Permissions

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