Search results

  1. T

    Error 91 driving me nuts

    As are so many things microsoftish
  2. T

    Error 91 driving me nuts

    cheekybuddah - definitely NOT a navel-gazer! Yep - all those worked with a couple of riders: 1. With .Workbooks.Open "\\Svrfiles\ACCESS DATABASES\cashrptgraph.xlsm", True, False 'needed to remove the with' .RefreshAll 'needed to add .activeworkbook' 2. Needed to keep the wait loop...
  3. T

    Error 91 driving me nuts

    Grateful thanks - potentially a lot tidier. will have a look later (one step at a time!!!)
  4. T

    Error 91 driving me nuts

    If I am, that would be my inept coding and certainly not deliberate :cautious:. SQL is INSERT INTO TblHolderCash ( FUND, Amount, Client ) SELECT DISTINCT TblInputSht.F1 AS FUND, TblInputSht.F2 AS AMOUNT, TblInputShtName.F1 AS Name FROM TblInputSht, TblInputShtName WHERE ((([TblInputSht].[F2]) Is...
  5. T

    Error 91 driving me nuts

    Thanks to everybody who contributed. Yep, I know (have always been aware) that the error handling is non-existent (I'm not good at that - untidy me). In the end a combination of Minty, DocMan and cheekybuddah's suggestions seems to have done the trick. In answer to Minty (last week) what I'm...
  6. T

    Error 91 driving me nuts

    I'm still trying... Minty - trying to close the original file using wbOutput("\\Svrfiles\access databases\Portfolio Test\").Close Savechanges:=Falsesimply creates a "subscript out of range" error (because that file is not there - set a breakpoint so I could check). Further - if I close the...
  7. T

    Error 91 driving me nuts

    Update Rechecked TaskManager and there were several Excel processes hidden there "waiting for a network process to complete" but not linked to any specific workbook. Will delve further.....
  8. T

    Error 91 driving me nuts

    But wouldn't xlApp.Quit do that? Have checked with Task Manager that there are no Excel processes still running.... Is there a way of specifically testing for (and closing) cashrptgraph.xlsm (or any other workbook for that matter)? -my lack of code skills showing here....
  9. T

    Error 91 driving me nuts

    Gasman If I had no OnError Goto statement, the code would just stop.... To trap errors, I need to find out what to trap (i.e. what I'm trying to discover here) thanks for the help tho...
  10. T

    Error 91 driving me nuts

    Thanks Minty - the consequence of loading in code snippets! Unfortunately, made no difference. I'm sure it's all linked to the fact that the second iteration opens the Excel file but for some reason it never becomes "active" (tested that with a message box to display the active worksheets count...
  11. T

    Error 91 driving me nuts

    To explain. I'm trying to open an Excel workbook, update its data from the database, save it to a folder and with a filename chosen by the user. All good so far. Code runs fine on first iteration but then fails with runtime error 91 on second iteration (and presumably the following ones)...
  12. T

    Hello

    I'm what could be called a professional amateur - been progamming Access apps since access 2000, but rarely in a very serious way. Self-taught (never a good thing) and am a code "tart" in that I use code found in this and similar fora (why reinvent the wheel?). Reluctantly about to post a...
Top Bottom