Search results

  1. H

    Help needed to read all text files in a folder

    Sorted. Amended Set fileObj = fso.GetFile(f.Name) to Set fileObj = fso.GetFile(path & f.Name) Secondly, the first file was corrupt. Once removed this worked perfectly. Art
  2. H

    Help needed to read all text files in a folder

    Thanks for the reply. Regrettably same problem with DIR. Art
  3. H

    Help needed to read all text files in a folder

    Hello Folks, I am attempting to read all the text files in to a folder using Access VBA. I need to open and read these as some pre-processing is required before writing the data to the appropriate tables. The following code does not work, but I do not understand why not. It opens the first...
  4. H

    event after find record?

    Well, you could intercept the event OnFocus (or whatever) so that you trigger some code when your form gets the focus back. However this will trigger every time the form gets focus, so before calling find/replace set a global flag so you can test that the form is getting focus after the required...
  5. H

    Are you an atheist?

    Well, now, hold on to your horses, you're going to love/hate this :eek: Premis 1 - We, Humans, are intelligent. OK, by and large, there are some examples which might give lie to this statement. Premis 2 - We live within a body called the Universe, or one of the Unvierses of the Multiverse...
  6. H

    Outlook

    Not an Outlook VBA expert, but, I dont believe you can alter the subject line of received mail directly. But.... What you could do is 1) get VBA to set up a reply. You can change the subject in the newly created mail. Dim rpl As Outlook.MailItem dim newmsg as Outlokk.MailItem...
  7. H

    Find/Replace JUST the second set of []

    or..... =SUBSTITUTE(SUBSTITUTE(A1,"[","",2),"]","",2) Firstly you need the input to be consistent. Substitutes new_text for old_text in a text string using the format: SUBSTITUTE(text,old_text,new_text,instance_num) =SUBSTITUTE(SUBSTITUTE(A1,"[","",2),"]","",2) SUBSTITUTE(A1,"[","",2) Looks...
  8. H

    What's Happening

    Me too as due to problems with my diabeties I have only worked 2 months in the last 15! However, it used to be a breach of contract to be on sick-leave. I would threaten with possible action under the Disabilities Discrimination Act if they try anything. Chances are they wont know whether you...
  9. H

    What's your best/worst joke?

    I had a differnt punchline: "grandma what are you doing to that TV?", "Well, I also find that if i twiddled his knobs and hit him occasionally my Boyfriend works just fine". erm...... I'll get my coat
  10. H

    Something Screwy About This...

    Reminds me of the song 'I am my own grandpa'
  11. H

    What's Happening

    Thanks for the kind mesages. Colin, I was forceably transfered to the private sector by the current government some years ago. I used to work for the DWP (actually been around long enough to remeber DHSS). Never changed employment contracts though; good ol' TUPE. The upshot is with 22 years...
  12. H

    Upsizing (Myself) to VB.net

    I have done it too, but more from an Excel VBA route. vb.net /= VBA. There are many simularities, and a fair few things will trip you up big style. The great news is "Google". I search "vb.net xxxx" to find how to do almost anything! Then there are forums to help out if you get really stuck...
  13. H

    What's Happening

    Well, on Thursday I find out if i have been thrown on the great scrap-heap of redundancy. So it isn't just Fridays!
  14. H

    Date stamping records

    use Format(yourdate, "dd-mm-yyyy")?
  15. H

    Screen Scraping to Access

    Well, yes and no. It kind of depends! I screen scrape regularly using the WebBrowser object in VB.net. So it is possible. If the website you are looking at is simple-ish HTML, then save the website to a text file and write some code to navigate around the HTML tags. If you need to enter...
  16. H

    Importing data from a text file into excel via VBA code

    The obvious option is File System Object Sub Read_text_File() Dim oFSO As New FileSystemObject Dim oFS Set oFS = oFSO.OpenTextFile("c:\textfile.TXT") Do Until oFS.AtEndOfStream activecell.value = oFS.ReadLine activecell.offset(1,0).select Loop End Sub...
  17. H

    Question Convert a string into a unique numeric value

    Erm, why not just introduce a new column with property 'autonumber'?
  18. H

    Halllowe'en Costumes

    Sorry Col, but we can't blame the Americans for this one. It's another corrupted European export... Art
  19. H

    Using combo of Excel VB, Access--to create auto-letters in Word!

    I think you need to look at word bookmarks. I seem to remember to can use the Word COM to navigate to a specific bookmark (using Goto bookmark name) and then insert the required text. HTH Art
  20. H

    Run Process on Schedule

    Hi, just google "VB Timer", it too is native! here's one solution out of many h**p://www.morrowland.com/apron/tutorials/vb/vb_timer/index.php So.... set your timer up with 7200000 (7,200,000) 120 minutes in milliseconds You can use "if Hours(now()) > 7 and hours(now()) < 19" type selection...
Top Bottom