Search results

  1. B

    Excel Instance wont close form Access VBA

    The key is associating every Excel method with the Excel Object. This can trick you because the method may actually function as expected in Excel even it is is not directly associted with the Excel object, but when it is completed, and you quit, that unassociated line of code will leave the...
  2. B

    Using an Array to populate a ListBox

    hmmm, well, I guess perhaps not. anybody?
  3. B

    How I can check if connection ti sql server is established with vba

    if you're also needing to check the status of the VPN, then you may want to check that statuts first. If you hve a mapped drive only visible when you're VPN is connected, something like: GetAttr TestPath will throw an error if it cannot be seen. (Where "TestPath" is a string containing some...
  4. B

    How I can check if connection ti sql server is established with vba

    Your connection has probably been declared with a name. Don't confuse the name of the function that opens the connection with the name of the actual connection. If so, ConnectionName.State should equal 1 if connected and 0 if not. So: If ConnectionName.State = 0 then OpenConnectionFunction
  5. B

    auto Serial Numbering for Each Quotation

    Based on your question, I'm a bit confused by your picture. What I see are 4 rows of "Sr No" and 4 rows of "Qty" but I only see two rows of other information added. It does appear that the "Sr No" field is unique, but are those unique to each line item for EVERY ORDER regardless of the...
  6. B

    Detecting Excel file is password protected

    Well, I guess that could work, but for simple password checking, all you really need to do is declare an Excel Workbook Object (Assuming you're working in Access) and then try to open the file. Put an error handler in and either it opens or it errors out with Err.Number 1004 (password exists)...
  7. B

    Detecting Excel file is password protected

    Did you ever find an answer to your question?
  8. B

    Using an Array to populate a ListBox

    So, yes, the listbox is originally populated in the form OnLoad. However, the initial lists of files is not refined. Once the form is opened, there is a ComboBox for the user to select different file types and further refine the list. Additionally, there default Drive originally searched in...
  9. B

    Using an Array to populate a ListBox

    I have some code that successfully gathers some items and adds these items to a listbox, one item at a time using .AddItem And it works ok. The problem is, when there are a bunch of items to add, everytime the .AddItem runs, the form redraws. I don't mind this terribly when there is only a few...
  10. B

    Problem with Win32_OperatingSystem Class PLEASE HELP

    THANKS JHB, it does indeed run! I had tried that same exact set of code prior to posting here, except I left off the _ after .Properties and it kept throwing "Object doesn't support property or method. d'OH! Thanks again mate!
  11. B

    Problem with Win32_OperatingSystem Class PLEASE HELP

    Thanks guys, but you're off track. If you look at the preceeding sub, it works just fine with the "." and "Win32_OperatingSystem" to pull the instance name. I also successfully use Win32_Processes in other functions to capture all the processes. PLEASE OTHERS, if you have some real ideas, hop...
  12. B

    Problem with Win32_OperatingSystem Class PLEASE HELP

    I need to get a list of all the Win32_OperatingSystem properties and their values on various different platforms. I’ve done some reading and testing and afraid I’ve hit a brick wall. Running Office 2010 (x86) on Win7 (x64) I’m able to get the Key Property value for the instance, but then...
  13. B

    Method 'Cells' of object '_Global' failed

    OK, I have fixed it. The problems was, clearly, the orphaned instance of Excel. The question was, what was causing it to be orphaned. For example, if I used all the code from the second code set I posted yesterday, except comments out all the functional Excel code and put a message box there...
  14. B

    Method 'Cells' of object '_Global' failed

    Hej JHB, Tak for din prøve, og ja, det virker! Jeg kan godt lide din brug af Split. Der var ikke sket for mig. Dog, vi stadig ende op med en forældreløse Excel forekomst med loop. Jeg har tænkt mig at se på en anden måde at få samme arbejdet gjort uden den forældreløse forekomst og vil...
  15. B

    Method 'Cells' of object '_Global' failed

    I really can't explain how this thread has gone so far off track, or why it is I am having to re-explain so many things that seem completely contradictory to what you are saying. First: I do declare an object reference, ExcelInst as an Excel.Application and then going even further, I also...
  16. B

    Method 'Cells' of object '_Global' failed

    Look, I really do appreciate your help, but if what you're saying is correct, it could not possible work, even for one cycle. The correctnes of this is that it IS operating Access, exactly as the functions would if they were called from within Excel. I can watch it go through. It turns off the...
  17. B

    Method 'Cells' of object '_Global' failed

    Also, I don't know if you saw it, but in my post at 02:56 PM I actually do mention that the second set of code does actually run, one full loop ( 0 to 19). The problem is that an Excel instance is orphaned and I need to be able to make sure it is killed with the Sub completes or it cannot be...
  18. B

    Method 'Cells' of object '_Global' failed

    no, I apprecaite your effort on my behalf, but this is off track. You are correct, "Cells" doesn't exist in Access except that I have added a reference to Exce14.0l in the project's references. That is how and why the normal Excel methods, including Cells and Range and Worksheets...
  19. B

    Method 'Cells' of object '_Global' failed

    so, in the above code, you can see I've moved the creating of ExcelInst outside the loop. In theory this allows me to keep the same instsance of Excel and just repeat adding/editing/closing new workbooks. The above code works a little better, but it is still not correct and I am a bit confused...
  20. B

    Method 'Cells' of object '_Global' failed

    errr, hit submit by mistake.
Back
Top Bottom