[AccessD] Automation of Excel through Access Problem

jeffrey.demulling at usbank.com jeffrey.demulling at usbank.com
Tue Jun 15 11:44:34 CDT 2004





Did not work.  I am still getting the same message (which I did not include
in my first post):

Run-time error '1004' Method 'Range' of object '_Global' failed.


                                                                                                                                               
                      "Gustav Brock"                                                                                                           
                      <gustav at cactus.dk>               To:       "Access Developers discussion and problem solving"                            
                      Sent by:                          <accessd at databaseadvisors.com>                                                         
                      accessd-bounces at databasea        cc:                                                                                     
                      dvisors.com                      Subject:  Re: [AccessD] Automation of Excel through Access Problem                      
                                                                                                                                               
                                                                                                                                               
                      06/15/2004 10:46 AM                                                                                                      
                      Please respond to "Access                                                                                                
                      Developers discussion and                                                                                                
                      problem solving"                                                                                                         
                                                                                                                                               
                                                                                                                                               




Hi jeffrey

You may need to "activate" the worksheet:

> 331       .Worksheets("AccountList").Activate

> 340       Range("A1:I1").Select


And why not use With/End_With a bit more:

  With .Worksheets("AccountList")
    With .PageSetup
      ...
    End With
    .Select
    ...
  End With

/gustav

--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com








More information about the AccessD mailing list