Jump to content

RamadSula

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by RamadSula

  1. Water Thanks for the all help. I figured what is causing one error and figured out a workaround for the rest. I began to create a simple hard coded version like you suggested that exploited the perceived weakness and discovered the error. The problem was that I was using the exact Windows Title including the " [READ ONLY] " in its name. I filtered out everything but the Name.Extension and the error message went away. However I was still unable to switch back to this document once another document was opened, such as a PDF. I experimented with assigning a separate Excel Object for each Excel document and found that I now could switch between documents. My document marquee is small , no more than nine documents, so having extra COM Objects is not huge deal. Thanks again for all your help.
  2. I apologize for the double forum posting , but this request morphed beyond the intent other forum. Project: I am creating GUI that runs a Document Marquee that cycles various Documents , i.e Word, PDF, Excel on a large display. There is one Excel document that is a maintenance log that is READ Only Request: I have an issue in which I can open a read only Excel document but not give it focus with Sheet Activate I apologize for the indirect addressing , I created an editable array for management to change documents in the Marquee. Code snipet : $logtxt = $Title[$Row][$Col] & " Attempt Active" Call("WritetoLog", $logtxt) $oExcel = ObjCreate("Excel.Application") ; Create initial Excel Object $oExcel.WorkBooks($Title[$Row][$Col]).Sheets($Tab[$Row][$Col]).Select() I still get Invalid Index Errors on Read Only when attempting to Select a read only worksheet. 09/27/2012 13:57:49 WorkBook maintenance crossover.xlsx [Read-Only] Tab maint log Attempt 09/27/2012 13:57:49 COM Error Hex Number is: 80020009 09/27/2012 13:57:49 COM Error Description is: Invalid index. If I create another version of the excel document that is not Read-only, the error goes away. Any thoughts on what may be causing it?
  3. Water I will do that right now .However I think the basic Excel UDF is gonna have the same problem with trying to Activate a read only excel document.
  4. Water Thank you for the response. I didn't want to take the time to replace all my code so I examined the Excel UDF , extracted what I needed and came up with. $oExcel.WorkBooks($Title[$Row][$Col]).Sheets($Tab[$Row][$Col]).Select() I still get Invalid Index Errors on Read Only when attempting to Select a read only worksheet. 09/27/2012 13:57:49 WorkBook maintenance crossover.xlsx [Read-Only] Tab maint log Attempt 09/27/2012 13:57:49 COM Error Hex Number is: 80020009 09/27/2012 13:57:49 COM Error Description is: Invalid index. Any thoughts on what may be causing it? A thought has occurred to me while writing this plea. I made the Document Marquee yo be a scripted based GUI that can an launch a particular document, loop through all documents or configure a GUI button to document.. The launch of document was coded to act as a single loop, i.e. the document opened and was then activated. The act of activating the last open document is redundant but should not cause any errors The document opens with no error but if I activate a read only EXCEL document I get an error.
  5. Water I just started using Autoit recently and wished I found your UDF before creating much of my own interface to EXCEL. Project: I am creating GUI that runs a Document Marquee that roates various Documents , i.e Word, PDF, Excel on a large display. There is one Excel document that is a maintenance log that is READ Only Request: I have an issue in which I can give focus to focus to the READ ONLY Excel Workbook. Is there a plan in your next UDF ( or does anyone know how ) to be able to Activate ( give focus to) a particular Read Only workbook without getting a "Invalid Index" I apologize for the indirect addressing , I created an editable array for management to change documents in the Marquee. Code: $logtxt = $Title[$Row][$Col] & " Attempt Active" Call("WritetoLog", $logtxt) $oExcel = ObjCreate("Excel.Application") ; Create initial Excel Object $oExcel.WorkBooks($Title[$Row][$Col]).Activate() ; Activate open workbook I use a Log system to a txt file to trap my errors instead of Popups 09/13/2012 08:52:37 maintenance crossover.xlsx [Read-Only] Attempt Active 09/13/2012 08:52:37 COM Error Hex Number is: 80020009 09/13/2012 08:52:37 COM Error Description is: Invalid index. Note: The READ-ONLY file will open but I can not switch to it via Activate() If I don't make maintenance crossover a Read-Only Activate() works just fine.
×
×
  • Create New...