Search results for query: *

  • Users: Camus
  • Order by date
  1. C

    moving files into folders based on filename

    Hey, can anyone give me a hand with some code that automatically moves files with a certain word within the filename to a specific folder? So all files where the filename contains "LH" gets moved to the folder called "LH"...all files where the filename contains "BH" gets moved to the folder...
  2. C

    Running code for all workbooks in excel

    I'm using this code within an excel macro to cycle through all workbooks in a directory and execute code within each one - Dim wb As Workbook Dim TheFile As String Dim MyPath As String MyPath = "C:\Temp" ChDir MyPath TheFile = Dir("*.csv") Do While TheFile <> "" Set wb =...
  3. C

    AnyDoc OCR VB

    Does anyone have any experience in using VB for a program called AnyDoc? You can implement VB to modify the templates that are used for data extraction, but there is no information on the net to help me with this... I'm not sure how widely the software is used so I'm not sure how many of you...
  4. C

    Error handling question

    Thanks, I did that. By the way, I got around the error handling problem by using 'on error resume next' so I did away with the try catch statements.
  5. C

    Error handling question

    hey thanks...so calling the function from a loop will cause it to keep repeating the loop when an error occurs? im not completely sure how to create the function or call it from a loop, any tips?
  6. C

    Error handling question

    I am renaming files from .txt to .csv within a directory. the code i am using to do this is - Dim number As Integer number = 5 Do While number = 5 Dim dir As DirectoryInfo = New DirectoryInfo("\\IFADATAFLOW1\SharedDocs\Test production bucket...
  7. C

    Listbox drag and drop

    Here's something I've been trying to do, hope someone can help with it... I want to move files from one location on my computer to another using listboxes. What I want to do is set up two list boxes side by side, I want listbox1 to display the contents of a particular folder on my computer, and...
  8. C

    Renaming files in a directory

    The software I'm using at the moment outputs .txt files, which I then have to rename manually to a .csv. Sometimes that involves renaming 30 or so files, which takes a while. How would I go about writing something in Visual Basic Express that would rename all the the files to have a .csv...
  9. C

    Text boxes that will save input to .txt or .xls

    I've fixed the problem of the text overwriting, and the issue of saving data into an already open txt file...so I think it's now more or less functional in the way I wanted, thanks alot for your help. Here's what I did just in case you're interested - Imports System.IO Public Class Form1...
  10. C

    Text boxes that will save input to .txt or .xls

    I've realised something while playing around with this, it's going to be a problem when somebody has the text file open reading the error logs, and someone else is trying to save a new error to it using the form at the same time. Is there a way around that? If not would it be possible to create...
  11. C

    Text boxes that will save input to .txt or .xls

    Hey thanks for that, seems to be what I was looking for. As you mentioned in the comments though, each time data is submitted to the text file, it overwrites it, losing the previous entry. How would I go about preventing that?
  12. C

    Text boxes that will save input to .txt or .xls

    I've got a question that I hope someone can answer for me...At my place of work we have one person that creates programs for the other employees to use. Because of the nature of the work there are generally errors, and the process of reporting them is rather fuzzy. What i want to do is create a...
  13. C

    opening folder based on creation date

    Paul, just tried that out, and it works very well, alot better than I'd imagined it would when i first asked about it. Thanks for that!
  14. C

    opening folder based on creation date

    Thanks, just so i understand, the Private Function code should be placed outside of the button_click events, and then the other two bits are placed within their respective button_click events? I have two questions though - I have lots of different buttons opening up different customer...
  15. C

    opening folder based on creation date

    that works completely now, tested it thoroughly today, thanks alot. I have another question for you if you dont mind... In that image there are two buttons, the one on the left opens a folder using that code you gave me...the button on the right displays the file contents of that folder in...
  16. C

    opening folder based on creation date

    Hey paul, yeah will definitely rate. Would that code also ignore a folder named "template issues" for example?
  17. C

    opening folder based on creation date

    yep that works correctly now thanks alot for that! One last question on this subject though - because of the strict date format applied in that code, the program will crash if there is a folder in the directory that doesnt apply to the rule 'MMM YYYY'. For example in some folders there is an...
  18. C

    opening folder based on creation date

    Thanks, I've been testing that out and the code seems to be sorting the month subfolders alphabetically rather than by date, so in practice, it navigates through the September folder every time...the subfolders for the specific days always opens correctly on the most recent creation date though...
  19. C

    opening folder based on creation date

    Paul (or anyone), I've put this program into testing this morning (see code in my post above). I've got a slight problem with it though. The code is set up to look for the main customer folder and then the sub folder named with the current month. The problem with that is, when a new month...
  20. C

    opening folder based on creation date

    Kind of, I did need to add an 'IO' in there, DirectoryInfo wasn't recognised so i changed it to IO.DirectoryInfo and that works perfectly! Thanks alot for your help, got there in the end. Just in case anyone else ever needs to do this, ill post the working code I'm using - Public Class Form1...
Back
Top