Creating Folders On Shared Drive - Path File Too Long
Dec 5, 2011
I've made a macro that would create some folders on a shared drive.
there is an issue if the path i want to create is too long.
I get this error.
Uploaded with ImageShack.us
is there anything we can do to pass this or any solution for it?
View 5 Replies
ADVERTISEMENT
Jun 12, 2009
I have a file which is kept on the C Drive. Each day, a different excel file is downloaded to a usb memory stick. The first file reads data from this file. The problem is, the drive letter keeps changing from E to F and the macro then crashes out.
The file on the memory stick always has the same name, so is there a macro to find the drive letter of this file and then use it in my existing macro?
View 10 Replies
View Related
May 2, 2014
I am trying to allow users to select a file, and then the file name/ the file path / and date are added.
Right now, all those functions work in the following code, but the file path shows up as a letter drive. As there could be upwards of 50 people using this file and the mapped drive could be different, i wanted the full path to be displayed.
Code:
Private Sub File_1_overwrite_Click()
Dim filename As Variant
Dim filename1 As Variant
filename = Application.GetOpenFilename(, , "Select Programme")
filename1 = filename
filename1 = Mid(filename, InStrRev(filename, "") + 1)
File_1_link = filename
file_1_name = filename1
File_1_date = Format(Date, "MM/DD/YY")
View 8 Replies
View Related
Nov 7, 2007
I am trying to open excel files in a file path which includes folders which also have excel folders i wish to open there are quite a few.
At the moment i am working with this code but it fails to open excel files which are within the folders in the specified file path. Its fine for excel workbooks in the folder specified by file path.
This is the code
Sub RunCodeOnAllXLSFiles()
Dim lCount As Long
Dim wbResults As Workbook
[Code].....
View 9 Replies
View Related
May 27, 2009
I am looking to have these workbooks save automatically to a folder on the C: drive.
If the folder I specify is not available on the C: drive, how do I write teh save comand to create it automatically with a prompt
View 8 Replies
View Related
Dec 7, 2007
An excel workbook we have on a shared drive is returning an error message: "The document is corrupt and cannot be opened. To try and repair it, use the Open and Repair command in the open dialog (File Menu) and select extract data when prompted. I am having trouble following those suggestions, Open an Repair doesnt' seem to be an option on the file menu. I have Excel 2003, is there any way to recover our workbook?
View 4 Replies
View Related
Dec 4, 2007
When saving excel workbooks in our shared drive, a second copy of the workbook (with an unusual name) is being saved in addition to the original copy. Why would this happen?
View 7 Replies
View Related
Aug 20, 2013
I currently have a password secured excel file on my departs Q drive, which everyone can access unfortunately only 1 person can edit at a time. I tried to turn it into a workbook so we could all edit it at the same time but now some of the other users can't access the file at our other buildings throughout the county. This is for excel 2010. And I did select the share workbook, and allow multiple users to edit box. everything else is unchanged.
View 3 Replies
View Related
Jan 5, 2008
Excel 2002 SP3
When a file is currently open, and the user selects "Save as", it takes them to the files native directory. (Where it was last saved).
If the user has that same file open, opens another file from a different directory, goes back to the first file and selects "Save as", it takes them to the location where the last file was opened from.
View 9 Replies
View Related
Nov 28, 2007
information about users selecting a folder at this link. However, how do I change the starting point to a network drive, as opposed to "My Computer"?
For example, we reference our network drives like this:
\OurSite.comSharedFoldersDivisionName
View 6 Replies
View Related
Sep 27, 2013
I have this code that copies existing folders to a new destination path. How do I change the code so that the From path and To path is based on cell value rather than writing it into the code?
Code:
Sub Copy_Folders()Set Fobj = CreateObject("Scripting.FileSystemObject")
Fobj.CopyFolder "C:UsersHengDocuments1243-01234photos", "C:UsersHengDocumentsCasework1243-01234photos"
End Sub
View 9 Replies
View Related
Jan 1, 2013
I build a VBA that search for 445 files in folders on specific path.
The code opens each file, take each time the same 31 rows, filter them and paste in the main data base file and then close the origin file.
So, for 445 files it takes about 6:30 minutes.
View 4 Replies
View Related
Aug 3, 2014
I have an Excel sheet that contains a few thousand folder paths in the first column. The first few cells in the column look similar to below.
C:UsersNameDesktopFolder Copy12010360
C:UsersNameDesktopFolder Copy12010361
C:UsersNameDesktopFolder Copy12010362
C:UsersNameDesktopFolder Copy12010363
C:UsersNameDesktopFolder Copy12010364
C:UsersNameDesktopFolder Copy12010365
I am trying to create a macro that will copy any folders that exist in any of the paths listed in the first column. The folders should be copied to the path of the open workbook containing the macro. Below is the macro I have currently, much of which was taken from information I found in this thread [URL]....
VB:
Sub wrapper3()
x = 1
Set fs = CreateObject("Scripting.FileSystemObject")
While Sheets("Air").Cells(x, 1) <> ""
v = InStrRev(Sheets("Air").Cells(x, 1), "")
dest = ActiveWorkbook.Path & Mid(Sheets("Air").Cells(x, 1), v, 99)
[Code]...
This code seems to work fine if all of the folders exist to be copied. My problem is that some do not and it is creating a "Path Not Found" error for which I need a fix. If the folder doesn't exist at the path nothing should be copied and the next path can be evaluated.
View 2 Replies
View Related
Mar 4, 2013
is it possible to configure Excel in order to save the Hyperlink path for a file with absolute path and non relative?
I notice that the hyperlink is ....pdf ry.pdf
if I change the position of the file excel there is a problem!
I would like to save es. d:invoichepdf ry.pdf
View 1 Replies
View Related
Sep 27, 2006
I have a variable ("DestFile") that defines a path to a file (used in saving the file)...
I'm in the process of getting a Sub to hyperlink to this file, but in some circumstances, I may only want to hyperlink to the folder, not the actual file...
How would I go about trimming the "DestFile" address to get a "DestFldr" address?...
An example of "DestFile" might be;
S:BryanFor KenGulf ConstructionST0609014-t.xls
(the file name length may vary)
What code can I use to consistently trim it back to;
S:BryanFor KenGulf Construction
as the "DestFldr" variable?
View 4 Replies
View Related
Oct 3, 2012
I want to run a macro to separate File Name and Path from the given complete path
For Example
Code:
In Column A : Given Complete Path " C:MainFolderRecordsSubFilesFile1Record.pdf
I need it separeted like
Code:
In Column B :File Name = Record.pdf
In Column C :File Path = C:MainFolderRecordsSubFilesFile1
Is there any way to do this through a macro
View 2 Replies
View Related
Jan 3, 2009
I need some help, I know very little about macros but is it possible to create folders/directories to a certain path using the text in an excel spreadsheet cell? For example, if cell a2 has a street address and cell b2 has a city, can it automatically create a directory in the path of my choice using that data? If yes, can it go down the the rows and create directories until it is done?
Please help as I have hundreds of directories to create.
View 6 Replies
View Related
Jun 3, 2006
I'm trying to save a spreadsheet using VBA which will also check that the directory exists and create it if not, all based on cell values in my spreadsheet. When I run my code it comes up with Run Time Error 76: Path not found.
Dim fname As String, dname As String, dname2 As String
fname = ActiveSheet.Range("E2").Value
dname = ActiveSheet.Range("G2").Value
dname2 = ActiveSheet.Range("H2").Value
Windows("Register Template.xls").Activate
ChDir ("H:")
If Len(Dir(dname2, vbDirectory)) = 0 Then
MkDir dname2
End If
ChDir dname2
ActiveWorkbook.SaveAs Filename:=fname
View 4 Replies
View Related
Feb 25, 2010
I would like to create a series of folders in explorer using a range of cells A1:A162 for the names of the folders. Wondering if there is a way that I can automate this using VBA versus doing it manually .
View 9 Replies
View Related
May 22, 2006
I am creating an excel worksheet. Every time a user opens the worksheet (from a template), I want to get the next numeric sequence number as a reference, showing it in the sheet. The template is available to multiple users but the sequence number should be unique, ie if user Tom has sequence 1, Jerry will get 2, then Anne will get 3 and Tom's next one will be 4. I considered an ASCII text file with a number in, eg 1. Upon opening get OPEN text file, READ text file, Convert to numeric.. add 1.. use this. Convert to string.. WRITE text file. It seems clumsy and since I can only open with READ or WRITE (append no good, since I want only 1 value held), the READ allows multiple users to access simulataneously, and potentially get the same sequence.
Is it possinle to:
LOCK file
OPEN file for read
READ file
CLOSE file
OPEN file for write
WRITE file
CLOSE file
UNCLOCK file
There are likely to be several users accessing the template and the chance of them opening it at the same time is limited, but possible.
View 3 Replies
View Related
Sep 2, 2008
I want to write a macro that would go to a certain drive and search for a file?
View 9 Replies
View Related
Dec 1, 2009
If you don't know what the drive letter will be, because on other people's computer it could be different than what you have.
I only have the folder address
\ROGERSDAILYREPORTSXLSDM
View 9 Replies
View Related
Jun 13, 2008
I made an excel sheet that links to other sheets on a different drive. It works while I am making it, but upon save and reopen all the hyperlinks produce this error: The address of this site is not valid. Check the address and try again.
Auto Merged Post Until 24 Hrs Passes;Figured it out. File, Properties, Summary tab, Hyperlink Box to base Drive. Auto Merged Post Until 24 Hrs Passes;Figured it out. File, Properties, Summary tab, Hyperlink Box to base Drive. Auto Merged Post Until 24 Hrs Passes;Figured it out. File, Properties, Summary tab, Hyperlink Box to base Drive. Figured it out. File, Properties, Summary tab, Hyperlink Box to base Drive.
View 2 Replies
View Related
Jul 25, 2014
I am trying to move and rename an excel template file using a macro. My code works fine when it is moving the file locally on my C: drive. However, when I try to do it on a mapped network drive I get a Path/File access error. Here is the relevant code:
[Code] ......
I tried it both ways that are commented out - both give me the error. I have permissions to read/write in all relevant folders. What am I missing here?
View 2 Replies
View Related
Apr 14, 2013
I need code to print a file located in my C drive.
View 6 Replies
View Related
Mar 20, 2014
I want to open a specific sheet and refresh only said sheet when i open another sheet for example x.xls
So opening x.xls will automatically open y.xls
I've tried this in the workbook code area but it doesn't do anything.
[Code] .....
View 1 Replies
View Related
Jan 7, 2007
I am designing a workbook that techs in my lab can use from any of our network computers to submit requests for making chemical solutions they need to run their tests. Currently they have to fill out a paper form to make the request, so this should make things a little more efficient and less paper intensive.
I have the workbook designed and working, but now need to implement it as a shared file and this is where the problems are occurring. I assumed that shared files could allow access to the same file AT THE SAME TIME with no issues, but that is not the case in Excel97 on our network. Using two networked computers side by side I have tried updating the shared file at the same time and got a myriad of popups. The include:
1) Do you want to save the changes you made to "..."? (I did not include the actual filename here.)
2) A file named "......" already exists in this location. Do you want to replace it?
3) "......" is now available for editing. Choose Read-Write to open it for editing.
4) This file is locked. Try the command later.
5) This file has been locked by for saving. Try again later.
Question:
Are these error messages normal for shared files? Do some reflect issues more with the network than with Excel? Is there any way to get VBA to simulate clicking a Yes, No, or Cancel, or OK whenever a one of these specific messages comes up?
View 9 Replies
View Related
Aug 11, 2005
Does anyone have a macro that would list all the folders (with path) and
subfolders to an excel sheet but not the files?
View 14 Replies
View Related
Nov 3, 2009
I am trying to import some csv files so I can combine them, but am having probs with the filename and location.
Sub test()
Dim wsName As String
wsName = ActiveCell
Sheets("Data").Select
With ActiveSheet.UsedRange
LastRow = .SpecialCells(11).Row
End With
With ActiveSheet.QueryTables.Add(Connection:="TEXT; &thisWorkbook.Path &" " & wsName &", Destination:= Range("A" & LastRow))
.Name = wsName
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells.....................
View 5 Replies
View Related
May 21, 2014
How to download the zip file from internet explorer and save it into c: using VBA codes.
I have tried many codes from the internet but none of them are working. i am facing problem for the popup box. the macro which i have found was not supporting to it.
Please find the source data from my web page.
[Code] ....
View 3 Replies
View Related