Search:

Type: Posts; User: Peter_W; Keyword(s):

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Re: Need to export data to existing Excel file, using variable in the file name

    All,

    I solved this issue through trial and error. The culprit was this line:


    Application.CurrentPoject.Path & "" & ProjExport & ".xlsm" that is the proper syntax, and then you can use a...
  2. Using variable instead of single file name for export to Excel, based on a form selection

    Hello all,

    There are various subs on the internet which export to an existing Excel file I have tried, and they work fine. But each one I've seen requires the use of a single file name such as...
  3. Re: Need to export data to existing Excel file, using variable in the file name

    Thanks Welshgasman, will give that I try.
  4. Re: Need to export data to existing Excel file, using variable in the file name

    Thanks Micron! That Snell doco really looks good. Hopefully my error/solution is in that link. Will check it out, thanks again.
  5. Re: Need to export data to existing Excel file, using variable in the file name

    OK, I found one previous error in the code....it was using Excel.Workbook in the dim and Excel.Workbooks in the file name line. So, making both Excel.Workbooks fixed the type mismatch problem.
    ...
  6. Re: Need to export data to existing Excel file, using variable in the file name

    Thank you Micron. Unfortunately, the approach of using ProjExport & ".xlsm", for the file name, does not work either. The code fails on that one line, with an error of: Run Time Error '13' type...
  7. Need to export data to existing Excel file, using variable in the file name

    Hello all,
    My Access 2010 database, using DAO formats, needs to export data to an existing Excel spreadsheet.

    I found some VBA code which works great, if I give it a single clear-cut file name,...
  8. Re: Access VBA: Create 2D Array, and Then Update Table With Array Data

    Stumac, your code works great! Thank you!!!

    I did need to tweak your code for Field3 as follows:

    For i = 0 To UBound(arrayString) - 1
    rsINPUT1.AddNew
    rsINPUT1!Field1 =...
  9. Re: Access VBA: Create 2D Array, and Then Update Table With Array Data

    Thank you Stumac. I will try your code suggestion. Its looks very interesting.

    I am personally stumped by the carriage return aspect.
    The original downloaded file is from SAP, and all I can...
  10. Access VBA: Create 2D Array, and Then Update Table With Array Data

    Hello, and as a non-programmer I struggle much with 2D arrays. I waive the proverbial white flag of surrender, and any help would be most merciful.

    I have a text download, which I have converted...
  11. Re: Using Clipboard_SetData function to copy small table

    Welshgasman, I had a typo in the code. Also, I needed to add MSForms (FM20.dll) under references too. The code works like a champ now! THANK YOU! Made my day, to say the least. Thanks RoryA for...
  12. Re: Using Clipboard_SetData function to copy small table

    Sir, thanks for all your help, but I'm still having trouble. I am trying to call the function from a sub: Call Table2String ("orders", "ordernum")

    VBA stops the function at this line" Dim...
  13. Re: Using Clipboard_SetData function to copy small table

    welshgasman, please excuse my ignorance, but how do I use this function? I assume I call it within a sub. My specific Access table is named Orders, and the field I need to make into a string is...
  14. Re: Using Clipboard_SetData function to copy small table

    Thank you sir for the code! I will try this now in my database, and will reply back. Best...
  15. Re: Using Clipboard_SetData function to copy small table

    Thank you welshgasman! Let me try that solution.
  16. Using Clipboard_SetData function to copy small table

    Hello,

    Within Access 2010. I am familiar with using the the Windows API, and then creating the function, Clipboard_SetData, which will copy some data to the clipboard, when called. Testing this,...
  17. Re: Access VBA - How to split data in one field and insert into other fields in an existing table

    Stumac, I got your code to work, and it works fine! Thank you! I believe a couple of times I was overwhelming the clipboard with too much data, and that may have prevented instances from running,...
  18. Re: Access VBA - How to split data in one field and insert into other fields in an existing table

    Thank you stumac for the de-bug. I will try this fix soon and get back. I have this distracting thing called my day job that I have to attend to now. All the best, Peter_W
  19. Re: Access VBA - How to split data in one field and insert into other fields in an existing table

    Thanks, I added the (I), but now the code breaks here, at this line:

    DataObj.GetFromClipboard

    I was testing with the same text data yesterday, and this line was not a problem. Any thoughts,...
  20. Re: Access VBA - How to split data in one field and insert into other fields in an existing table

    Thank you Joe4 and stumac for your replies.

    I tried the above code from stumac, and the code stops at the line below, and the error message is "Compile error: Type mismatch"

    splitValues =...
  21. Re: Access VBA - How to split data in one field and insert into other fields in an existing table

    Thanks Joe for the quick reply. Below is sample input, in tabular form, which is fed into the Access database by the copy from clipboard code (not exactly like my very simplified example, but again,...
  22. Access VBA - How to split data in one field and insert into other fields in an existing table

    Hello all,

    I have a piece of code regarding the "Split" function in Access VBA. It works great.

    That is, basically, my sub takes a block of data, as a string, received by the Access...
  23. Re: VBA Looping Thru Sheets, and Adding and Naming Ranges in Sheets

    Fluff, I got this code to work. I had another issue that prevented it from working. Which I found and fixed. All set now. Thanks for your support!
  24. Re: VBA Looping Thru Sheets, and Adding and Naming Ranges in Sheets

    Ok Fluff, thank you for your prompt reviews. I will look at the other code I have. Peter_W
  25. Re: VBA Looping Thru Sheets, and Adding and Naming Ranges in Sheets

    This code works (or doesn't work) very inconsistently. After working a few times, I can use it again and get no ranges at all, during another looping iteration.

    Totally baffles me, Pete
Results 1 to 25 of 28
Page 1 of 2 1 2