• WSpeterguk

    WSpeterguk

    @wspeterguk

    Viewing 15 replies - 61 through 75 (of 82 total)
    Author
    Replies
    • in reply to: Copy/Paste from VBA #529510

      Hi Andrew

      Yes, i have set a reference to Excel, in fact, this bit of code is in the same procedure as the other code you refer to.

      In addition, when i step through the code, the cursor indicates the correct row number when held over rng.row, so that bit is working, and furthermore, if the row number is such that it should be skipped, it is skipped, so the Mod line is definately OK.

    • in reply to: Autonumber field from VBA #529397

      Hi Rory

      Yes, i am running this code from within Access. Am i correct in saying i will always need to use the bit before the dot (sorry about the technical reference 🙂 )whilst referencing Excel (or any other Office app. whilst in Access?

      Anything else i should look out for???

      Thank you for your contribution.

    • in reply to: Autonumber field from VBA #529363

      Well, i’ve solved it!!

      After loads of reading about automation and looking at dozens of irrelevant examples i tried changing:

      Dim r as range

      to:

      Dim r as Excel.Range

      and hey presto!

      What i’d like to know is why i have to put this and you don’t????

    • in reply to: Autonumber field from VBA #529183

      Hi Jon.

      Thanks once again for your help. I’m getting there slowly, and although i am experienced in Access VBA, I am quite new to Excel programming. In fact, i’ve even been out this morning and bought MS’s Excel VBA book to give me a start. 🙂

      OK, to my problem. I’m now able to create the new blank column, but i’m getting a “Method or Data Member not found” error message on the “row” bit of this line:

      Cells(r.row, 1) = r.row

      I know from Access programming that you’re usually going OK if you use one of the choices offered in the box that comes up after typing the dot, but in this case “row” is not offered.

      Have i got something wrong???

    • in reply to: Autonumber field from VBA #529095

      Thanks for your comments Andrew.

      Not sure if i made myself clear, but what i want to do from within my import code in Access is add a new column to the worksheet and update each row with a unique number, i.e. the equivelant of autonumbering a table in Access.

    • in reply to: Autonumber field from VBA #529024

      Thanks Jon for your prompt reply. I’ve been looking all morning for a module in an old database that had the code i’m looking for, but it continues to elude me.

      Can you tell me how i create a field in the worksheet please?

      Cheers

    • in reply to: “End of Recordset” MessageBox #528033

      Hey, that’s perfect!!!!

      Thank you very much for your assistance.

      I guess i need to go away and learn all there is to know about bookmarks…..

      Peter

    • in reply to: “End of Recordset” MessageBox #528016

      Hi

      I’ve been trying to do that, but without much success. Here’s my code:

      Dim dbs As DATABASE, rst As Recordset

      Set dbs = Currentdb
      Set rst = Me.RecordsetClone

      With rst
      If rst.EOF Then

      Exit Sub

      Else

      MsgBox (“OK Message”)

      docmd.GoToRecord , , acNext

      End If

      End With

      If i run this under the “Next record” button, i still get my test message and “End of recordset” message. Any ideas where i am going wrong??

    • in reply to: Run macro from a separate DB?? #528011

      Hi. This subject interests me too. I have three databases which run reports automatically at night. I have built a forth database which backs up and compacts the other three, but of course, this can’t be done if the databases are open. What i have mananaged to do is run macros within the three from the forth using run msaccess.exe /db name etc (actual code on request), but i am sure it must be possible to run code remotely by creating a workspace??? I agree, running macros is not at all nice compared to running code, which is why i would love to get this sorted out.

      At the moment i have to leave all four open, and then rely on a whole bunch of timers to run reports and close each app. down before the timer on the compactor kicks in, but i really would like to be able to “control” each of the three from the fouth.

    • in reply to: Countdown Timer #527813

      Rory. That’s great thank you. I can see now that my code was running in it’s entirety on the timer event, and not one loop at a time. Great!

    • in reply to: Dynamically setting a form’s recordsource #525583

      Hi. Thank you for your prompt reply. Unfortunately this database is run from a server location as my company will not allow the logon scripts to be modified in terms of updating the front end……

    • in reply to: Schedule+ / Outlook #523883

      Mary, you’re a star! Thanks very much. I knew there was a good reason for keeping that Office 95 disc!

      Many thanks again for your efforts.

    • in reply to: Schedule+ / Outlook #523722

      Thanks for your reply Mary.

      Yes, both they and I have access to both Win95 and Win98. Are the files i need to find easy, or will it be a case of “missing dll” errors for ever 🙂 ???

    • in reply to: Security/Confidentiality #523671

      Thanks for your reply. Sounds hopeful! Apologies for my ignorance, but where do i find these settings?

    • in reply to: Error Handling within a loop… #522100

      OK, sorted it. Put the End If before the mytable.movenext. Good Grief! Thanks for your help. My application is now one bit more idiot proof 🙂

    Viewing 15 replies - 61 through 75 (of 82 total)