Results 1 to 4 of 4
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Formatting Exported Colums (2003)

    On the startup form of the attached mdb, please select 2008 as the year and click the Export button.
    Is it possible, in code, to format each column separately in the spreadsheet created? I need to do that because some columns have decimals while others don't.
    Attached Files Attached Files

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Formatting Exported Colums (2003)

    You can use Automation to
    - run an invisible instance of Excel
    - open the exported workbook
    - format the sheet the way you want
    - save and close the workbook
    - quit Excel (if necessary)

    If you search this forum for Excel.Application, you'll find examples of automating Excel.

  4. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formatting Exported Colums (2003)

    Thank you Hans <img src=/S/smile.gif border=0 alt=smile width=15 height=15>, what's the purpose of running an invisible instance of Excel, since the user needs to see the output?

  5. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Formatting Exported Colums (2003)

    The idea of Automation is that you run Visual Basic code in another application without user intervention, so there's no need to distract the user by making the application visible, showing an icon in the taskbar etc. But it's possible to set the Visible property of the Excel.Application object variable to True. This unhides the application.

Posting Permissions

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