Results 1 to 3 of 3

Thread: Xl from Acce$$

  1. #1
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Arrow Unanswered: Xl from Acce$$

    If you have an Excel file, which has data in the range say B1:F20. I want to manipulate if form Acce$$. Is there a way to know this range which contains the data? I started something like that

    PHP Code:
      Dim xlApl As Excel.Application
      Dim xlWrkBook 
    As Excel.Workbook
      Dim xlSheet 
    As Excel.Worksheet
      Dim xlRange 
    As Excel.Range
      
      Set xlApl 
    = New Excel.Application
      Set xlWrkBook 
    GetObject("c:\Temp\anyFileName.xls")
      
    MsgBox (xlSheet.Range("B1").Value
    It functions ok, but say, for some reason the data will not start in B1, how can I know that? Or how can I determine where the data starts and ends i.e the data Range
    Thanks

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    I found it, perhaps it is useful for you.

    ActiveWorkbook.Sheets(1).Range(B2).CurrentRegion .Rows.Count

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Good show sir.


    One of my biggest pet peeves is when folks neglect to let you know what worked for them. It sort of gyps anyone else who has the same problem.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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