Results 1 to 13 of 13

VBA does not recognize open workbook. Error which emerges is - document is out of range

Threaded View

  1. #1
    Registered User
    Join Date
    02-27-2022
    Location
    Slovenia
    MS-Off Ver
    Office 365
    Posts
    7

    VBA does not recognize open workbook. Error which emerges is - document is out of range

    Dear all,
    I would like to totally automate report which I create every month. So far, I create 2 modules. First module I use to get data from SAP and second module I use to create pivot table and send data to already prepared table. Due to error (out of range) in first module, I have to stop macro and copy paste data manually in file where I run macro. Problem is that VBA does not recognize workbook which I export from SAP. I also read that there could be some issue with Excel instance. I also try with workbook as object but it doesn’t work. I would be very happy if somebody helps me to solve this issue and of course to help others if they have the similar issue. Code is down below and I also mark where issue appear. Kind regards Dean

    Workbooks("Delovni list v Basis (1)").Sheets("List1").Activate -> where issue appear
    ActiveSheet.Cells.Select
    Selection.Copy
    Workbooks("SVTK LJ tekoce 2021 tabela.xls").Sheets("List1").Activate
    ActiveSheet.Range("A1").Select
    ActiveSheet.Paste
    Workbooks("Delovni list v Basis (1)").Close SaveChanges:=False
    Last edited by AliGW; 02-27-2022 at 07:09 AM. Reason: Code tags added.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. error when hiding application while another document open
    By Undo in forum Word Programming / VBA / Macros
    Replies: 5
    Last Post: 11-29-2021, 12:42 PM
  2. [SOLVED] Code Error when another Excel document is open
    By Si-Phy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-04-2017, 09:49 AM
  3. [SOLVED] Update document (Word file) on workbook open
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-14-2015, 06:39 AM
  4. open excel source document in background when i open word document
    By hootiebsc in forum Word Programming / VBA / Macros
    Replies: 5
    Last Post: 03-22-2013, 07:50 PM
  5. macro to copy cells(Range) from an open Workbook to another open Workbook.
    By jbester in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2013, 09:47 AM
  6. runtime error recived for some trying to open document
    By webguync in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-26-2009, 05:29 PM
  7. i cannot open excel file error Cannot access read-only document me
    By Lenda. in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-14-2005, 03:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1