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...
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...
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
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...
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 =...
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...
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
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...
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)
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...
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\...
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?
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?
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...
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
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