Search results

  1. C

    Count characters in file upto specific character

    Hi, I have a text file that im reading in VB. Im using the following code to specify the start and length of the text i want to import surnames into a table (position 5 in text doc, 9 in length) and these values are closed with a semi-colon. If Trim(Mid(strLineOfText, 5, 9)) <> "" Then...
  2. C

    SPLIT string error

    hi all, Just kinda bumping this cause its annoying me XD dim strArray() as variant dim strName as string strName = "123-1-Cornwall" strArray = split(strName, "-") strname = strAray(1) & " - " & strArray(3) Problem being it says type mismatch on the line: strArray = split(strName...
  3. C

    Replace function for specific postion

    I receive a type mismatch on this :x (though im passing in the currentFile, which holds the strName
  4. C

    Replace function for specific postion

    thanks gemma, it relates to my previous post so only files with a start of number-number-text will be included in a if statement that works this out so will always be true
  5. C

    Seperating images with page numbers

    f is a recordset of all files within the specified directory, and F1 is each individual file as its looped.
  6. C

    Seperating images with page numbers

    Hi, thanks alot for your contribution but i managed to solve this last night, sorry i didnt state this!! I did a recordset which checked every file within, and an if statement for any that had the first 4 then moved to a specified directory named after the file minus the page number and throw...
  7. C

    Replace function for specific postion

    Hi all, Currently need to fine a way to change my file: 123-1-Cornwall I want to remove the -1 character from the above file to leave: 123 - Cornwall Ive been looking at things an believe replace is what i need but not sure how to adapt it to the 2 character positions. currentFile =...
  8. C

    Seperating images with page numbers

    i understand your point but im seperating every group of files from different trips, so i could have 1 as 666-Cornwall.jpg and one as 12~01~2008 Cornwall.jpg I know its rather awkward but i just want a degree of accuracy. I imagined it would be simple with a "If left(filename, ####-) kind of...
  9. C

    Seperating images with page numbers

    Im moving them all into seperate files, but need to distinguish the ones with ###- so i dont mix them ,as shown in the first example 123-1-Malta.jpg 123-2-Malta.jpg 123-13-Malta.jpg 456-1-Cornwall.jpg i want malta and cornwall in seperate folders
  10. C

    Seperating images with page numbers

    would do but theres some images that have full names like 00123456DSC.jpg
  11. C

    Seperating images with page numbers

    Hi all, I am currently moving photos from 1 directory to another via VBA, basically scanned images. Some of the files have page numbers so i was going to do an if statement but not sure how. The images are e.g 123-1-Malta.jpg 123-2-Malta.jpg 123-13-Malta.jpg 456-1-Cornwall.jpg Was...
  12. C

    Create Directorys based on table paths

    Thanks for all your input, because my lack of understanding i just nested a second recordset inside the the first, with several error handlers for error 75 (duplicate folder)
  13. C

    Create Directorys based on table paths

    Ive interperated what you suggested as Do Until FileID.EOF MakeSureDirectoryPathExists (strFilePath) FileID.MoveNext Loop Public Declare Function MakeSureDirectoryPathExists Lib "imagehlp.dll" (ByVal DirPath As String) As Long End Function But i get an error so...
  14. C

    Create Directorys based on table paths

    Hi all, I have a table at current that has various lines containing file paths which i want to manipulate with VB. But i first want to copy all those files into the relevant folders (folders created in a new folder). e.g of a file path. Path FolderID FolderNum C:\Work\ A1\...
  15. C

    Difference between 2 tables

    again worked a treat. Final thing (i hope) If the expected table was to be blank, the above wouldnt work thus would only want to compare the initial 2 tables. If there a way to incorperate this exception?
  16. C

    Difference between 2 tables

    that works fine for 2, thanks, another question, how would 3 work? So i could have a tblbefore, an expected (tblexpected, same fields), and a tblafter where the before and after tables are compared to the expected table?
  17. C

    Difference between 2 tables

    Hi, I have 2 tables of which have several different values. One is a before changes table and one is a after changes table (tblbefore / tblafter). I want the after table to show all records where the Total is different to what it was before. So: Name Ref Total J Johns A123...
  18. C

    Combo box default?

    worked a treat, ty
  19. C

    Combo box default?

    Hi all, I cant seem to work out how to get a combo box to display a value on loading the form. I want the Name John to be the default value on the list when the form loads up. I have tried the following to no such luck. cboName.ListIndex = 0 Me.cboName.DefaultValue = "John" Thanks
  20. C

    Form Textbox count where date is between 2 dates

    Thats it, all done, thank you all so much for your efforts, especially Magic whom ive probably given a migrane and Namliam who offered the final solution :D
Back
Top Bottom