Last little problem. I'm trying to get the macro to look in the folder that is in cell B2. It worked when i had folderspec="folder path" but i want it to be able to do whatever folder the user types in B2.
Thanks in advance.
Sub Macro2()
Dim oFSO, oFile, folderspec As String
Set oFSO =...
when i run this code it says that 'oFile.Path' could not be found
Sub Macro2()
Dim oFSO, oFile, folderspec As String
Set oFSO = CreateObject("Scripting.FileSystemObject")
folderspec = "C:\Documents and Settings\carsongm\Desktop\SRWM results"
For Each oFile In...
where it says "Filename:=" should i put in a filename from the folder or leave it as oFile.Path? because when i put it as a filename from the folder it only runs that particular text.
This is the code i have gotten so far, however i still have a problem:
I've only gotten it to run for the one .txt and not all of them. This will need to be changed for the copying and pasting as well as the closing of the .txt.
Any help is appreciated
Sub Macro2()
Dim oFSO, oFile...
This is about all I could figure out so far. I can probably figure out the reading each individual text and extracting data from it. I'm more troubled by the opening the directory, and running each text file within that directory.
Application.DisplayAlerts = False...
jges: I am using excel 2007. The text is in WordPad and looks just like i have typed it above. The first four lines need skipped because they just contain file titles and other useless information.
SkipVought: If you read the original post it states, "I understand your time is valuable so even...
I apologize for the lengthy task, but I have run into a tight spot and my boss is on my butt to do this, quite frankly i've never used visual basic before. I understand your time is valuable so even hints or parts of the code would be appreciated, but if you can do the whole thing i'd love you...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.