I am deleting all files in a subfolder, then I am deleting all subfolders, then I am trying to delete the main folder.
All work except the last rmdir
I am the only one with access to this server, and no workbooks are open when I run the procedure.
Code:
Kill ("H:\Scorecards\Quality\*.*")...
I am trying to check to see if a directory exists. If it does not it needs to create the directory. If it does exists go to next procedure.
The code works if it does not exists, but does not work if the directory exists.
Code:
If Len(Dir("H:\Scorecards\")) = 0 Then
MkDir...
Skip,
Looks like it will work, but I can not get the job to go to the next ID. I do not use for each next loops, so I think I may have the next posted inaccuratly.
I do not think I need to use the activeCell.Offset(1,0).Select anymore becaue the for each next loop takes the place of all that...
With some minor tweaking, I got the first part to work. I can surely tell the difference in my guerilla coding in your professional coding.
Next error:
on Set ws = Workbooks.Open( _
FileName:=sPath & "On-time%20Shipment/" & r.Offset(0, 1) & " " & r.Value & ".xls")
It File Open, but I...
on .Sheet2(2).Delete
I am getting a Compile Error: Method or data member not found.
on Set ws = Workbooks.Open( _
FileName:=sPath & "On-time%20Shipment/" & r.Offset(0, 1) & " " & r.Value & ".xls")
It opens the file, but I am getting a Type mismatch error
Skip,
In looking at the code that you supplied (thanks) it looks like this is simplifying the beginning part of my code. The beginning part current functions properly, even though poorly designed.
Do you think that if I edit the beginning part it will resolve the other issue?
The original workbook (Master List) I copy Columns A:B and paste into a new workbook (Table); closing the original workbook.
The new workbook contains the list.
Exact Code in current Sub()
Sub COMBINE()
'
' COMBINE Macro
' Macro recorded by NACCO
'
'
Application.DisplayAlerts = False
Dim r As Range
Workbooks.Open FileName:="http://amersharepoint/SupplyChainManagement/amerprocure/combined_scorecards/Master%20Data/Master%20List.xls"...
SkipVought,
I redid everything and it did not function properly. So I took out the on error resume next to find the bug.
on the line of code For Each r In Range([A2], [A2].End(xlDown)) I am getting error 424
What I am trying to do:
I am opening a list on a sharepoint site to get an ever changing list of vendor ID's.
I am copying this information and putting into a new workbook.
I go to each vendor ID, and look for a certain file on a sharepoint site that contains the ID.
I then take each of the...
When the Do until starts for the second time, I get error 1004.
All code:
Application.DisplayAlerts = False
Workbooks.Open FileName:="http://amersharepoint/SupplyChainManagement/amerprocure/combined_scorecards/Master%20Data/Master%20List.xls"
Columns("A:B").Copy
Workbooks.Add...
I have a static list of numbers (Vendor ID) and the job cycles through each number and opens a file (if present).
The problem is that the On Error only works the first time through the job. I can not use On Error Resume Next, because I have lines of code that if the file opens that need to be...
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.