Access Excel Automation Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Keith Wilby

    #1

    Access Excel Automation Question

    How controllable from Access VBA is Excel? I'm currently using automation
    to dump 2 columns of data into an Excel spreadsheet so that the end user can
    create a line graph based on it. Could the line graph be created from
    Access as part of the automation process? Is it also possible to rename the
    Excel worksheets from Access?

    Thanks.

    Keith.


  • Tom van Stiphout

    #2
    Re: Access Excel Automation Question

    On Wed, 28 Mar 2007 10:21:26 +0100, "Keith Wilby" <here@there.com >
    wrote:

    Yes, thanks to the power of Automation.
    Once you have a reference to Excel.Applicati on, you can use its entire
    object model to do anything you want.
    Tip: install Excel in its entirety, including the VBA help file.
    Tip: use the Macro recorder in Excel to see what it would use to
    create a line graph or rename a doc.

    -Tom.

    >How controllable from Access VBA is Excel? I'm currently using automation
    >to dump 2 columns of data into an Excel spreadsheet so that the end user can
    >create a line graph based on it. Could the line graph be created from
    >Access as part of the automation process? Is it also possible to rename the
    >Excel worksheets from Access?
    >
    >Thanks.
    >
    >Keith.
    >

    Comment

    • Keith Wilby

      #3
      Re: Access Excel Automation Question

      "Tom van Stiphout" <no.spam.tom774 4@cox.netwrote in message
      news:oask039dh3 j8ojvau0vuqjs6q e7h4l3f0n@4ax.c om...
      On Wed, 28 Mar 2007 10:21:26 +0100, "Keith Wilby" <here@there.com >
      wrote:
      >
      Yes, thanks to the power of Automation.
      Once you have a reference to Excel.Applicati on, you can use its entire
      object model to do anything you want.
      Tip: install Excel in its entirety, including the VBA help file.
      Tip: use the Macro recorder in Excel to see what it would use to
      create a line graph or rename a doc.
      >
      Thanks Tom, I'll give it a go.

      Keith.


      Comment

      • Keith Wilby

        #4
        Re: Access Excel Automation Question

        "Tom van Stiphout" <no.spam.tom774 4@cox.netwrote in message
        news:oask039dh3 j8ojvau0vuqjs6q e7h4l3f0n@4ax.c om...
        On Wed, 28 Mar 2007 10:21:26 +0100, "Keith Wilby" <here@there.com >
        wrote:
        >
        Yes, thanks to the power of Automation.
        Once you have a reference to Excel.Applicati on, you can use its entire
        object model to do anything you want.
        Tip: install Excel in its entirety, including the VBA help file.
        Tip: use the Macro recorder in Excel to see what it would use to
        create a line graph or rename a doc.
        >
        OK I'm stuck on something that should be really simple - I want to create a
        new worksheet and give it a specific name. The best I can come up with is

        With objXL.Sheets.Ad d
        .Name = "Boat " & Me.cboBoat
        End With

        but this adds TWO sheets, one with the name I want and one name "Sheet n" -
        any ideas?

        Many thanks,
        Keith.


        Comment

        • Keith Wilby

          #5
          Re: Access Excel Automation Question

          "Keith Wilby" <here@there.com wrote in message
          news:460b7919$1 _1@glkas0286.gr eenlnk.net...

          Never mind, penny has dropped :-)

          objXL.Sheets.Ad d
          objXL.ActiveShe et.Name = "Boat " & Me.cboBoat.Valu e

          Keith.


          Comment

          Working...