Zum Hauptinhalt gehen

Suche

Suche

Bartender: Save Printed Data to Excel

Kommentare

2 Kommentare

  • Avatar
    John Kral

    This is likely due to a missing reference file for either Excel or VBA in general. Can you try to define the xlUp as follows?

    xlUp = -4162

    Let me know if that solves the problem. If not, we may need to break out your line there a bit more to see if there is another issue that could be causing it.

    masterNextRow = objWorkbook.Worksheets("Data").Range("A" & objWorkbook.Worksheets("Data").rows.count).End(xlUp).Offset(1).Row

    Set objSheet = objWorkbook.Worksheets("Data")

    LastRow = objSheet.Rows.Count 'note this is a static number so you can probably just input "A1048576"

    xlUp = -4162

    Set lastdatacell = objSheet.Range("A" & LastRow).End(xlUp)
    Set offsetcell = objSheet.Range("A" & LastRow).End(xlUp).Offset(1)
    masterNextRow = offsetcell.Row

    Basically we are seeing if it is only the xlUp that's the issue and if not, where else it might exist. My guess is that defining the xlUp will resolve your issue - though I cannot easily validate/duplicate with my setup.

    0
  • Avatar
    Dang Nguyen

    Thanks John!

    It works

     

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.