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. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 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.

  3. #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?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 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
  •