Add-in Not Referenced When Workbook Run From USB Drive On Computer
Jul 10, 2012
I have an Add-In installed on multiple computers. When I update it I update them all at the same time so that everyone is on the same page. The Add-In is always in the same location for all computers.
C:- Global FilesVF MacroVF Macro Add-In.xlam
I use the Add-In to format a sheet and one of the formats is to display the "last author" & "Last Save Time" This is the code used:
Code:
Function DocProps(prop As String)
Application.Volatile
On Error GoTo err_value
[Code]....
The same situation occurs with cell Z8 as well. It appears it is looking in the wrong location. If I change the E to a C in the formula bar it fixes the issue but I cannot rely on my users to do this every time. We keep the WB's in question on an external drive and pass it around as needed. So they will run into this problem on a regular basis.
I also get a "Security Warning - Automatic update of Links has been disabled" message only when run from the USB drive.
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?
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.
I wish to send a workbook but need to ensure that this workbook stays on the computer it is destined for. I understand that for ultimate security excel may not be the best option, however im using excel and with that need to look at the best options available to me.
My thoughts were along the lines of sending a simple application for better words in excel, and having the user fill in a few details, this would trigger a events macro recording A the machine id ( which i have forgotten how to do any any help would be great with that ) or B the user ID to a hidden cell, then on receiving this back be able to use that as a key in the application before sending it out.
Then if the user was to pass this to another person it would not work as the code would not match. Does this seem like a best approach or is there a better way that a similar effect could be had?
Worksheet1 is modified on computer A. Worksheet1 is open on computer B. The instant something changes on Worksheet1 on computer A, Worksheet1 on computer B is updated.
Idea 1:Maybe worksheet1 on computer B could be opened read-only and then the notify feature could be used to trigger a macro in worsheet1 on computer B. By notify I am talking about the box that pops up when a user has finished modifying a worksheet to let you know you have read/write access.
Idea 2: Could all cells in worksheet1 on computer B be linked to all cells in worksheet1 on computer A and automate the updating somehow this way?
My SUMIF function only works when the workbook that I'm referencing to is open. When it's closed and I open the file it shows #VALUE!. How do I fix this problem?
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?
I have a condition setup (under "This Workbook") upon opening a spreadsheet to verify a computer's predetermined motherboard serial number that will shut the Excel workbook down if the numbers do not match. This works fine. What I'd like to do is to add a second condition that will allow a password to be entered in a textbox if the numbers do not match so that the serial number condition could be manually overridden, if necessary. If the serial number and the password are incorrect the workbook automatically closes.
Here is the code that works:
Private Sub Workbook_Open() If CreateObject("Scripting.FileSystemObject").GetDrive("C:").SerialNumber "-XXXXXXX" Then ActiveWorkbook.Close False End Sub
Here is what I am attempting to do that is not functioning properly - need to add a textbox to enter a password to override an incorrect serial number
Private Sub Workbook_Open() If CreateObject("Scripting.FileSystemObject").GetDrive("C:").SerialNumber "-XXXXXXX" Then Dim Rng Rng = InputBox("aaaaaa") If Rng "aaaaaa" Then ActiveWorkbook.Close False End Sub
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.
I am busy writing projects and the macros that I write reference external files (no surprise there). Normally, all referenced files are on the company's main G: drive but recently the company have started the process of re-appraising all access authorities for the folders in the G: drive. This has necessitated that they create a new drive (called J:) and folders and users are being migrated over there as they have been cleaned and approved.
All of this means that some of my users reference J: and some G: and my macros are intermittently falling over because of it. For each user, all the files that they will need will be on either the J: or the G: drive, but not both.
All of the above leads me to ask the following question... How can I build into the macros a "Check what drive you're on and use that letter" line of code
I use the Hyperlink to open PDF files that are on the CD drive from my spreadsheet. I am on Windows XP and the CD drive is the D drive. In Vista the CD drive is the E drive.
When I take the spreadsheet to a Vista machine the link fails as there is no D drive.
Is there any to code the path of the Hyperlink so it will go to th default CD drive for that computer.
We have a form that is completed by our employees and emailed to a central group email address that up to 8 employees within our team can access. When one of our 8 team members open the file sent they need to add comments to it and then save it in a central directory on one of our network drives.
Now the problem I have is that we all have the network drive mapped to a different letter.
Is there a way that I can have a macro (see below for current macro that does not work) save to a network path and not a drive letter.
I have a an excel workbook that is distributed on a flash drive. Currently a Save As Macro copies "A1" as the file name and then opens a screen to allows the user to save that filename to a location that the user selects. What I would like to have happen is for a command button to start a macro that would automatically save the file back to the flash drive that the master workbook is located.
I have a program that relies on a remote drive being open and ready. My current tactic (which works perfectly well) is to have a file in the destination drive and ask the date that file was created. If an error occurs I know the destination drive is not ready.
Code: On Error Resume Next temp = FileDateTime(destDrive & "xDeletedStuff" & "testFile.txt") If Err Then MsgBox "Destination Drive / Folder Not Ready" Exit Sub End If On Error GoTo 0
Idealy I would rather not use the "testFile" I would prefer to just test to see if the folder existed, "destDrive & "xDeletedStuff"
I have part of the code below and need to modify it so that others who only have C: instead of D: to use it
Filename = "D:TempBudgetMonthly.xls"
FileExists = (Dir(Filename) "") If FileExists = False Then msg = "The data file Monthly.xls does not exist !! Load the required file and run the report again !"
If MsgBox(msg, vbExclamation + vbOKCancel) = vbOK Then End If Exit Sub End If
I need code to replace all D: to C: for the entire PROJECT not MODULE.
I am trying to get a excel to list all the file names in a drive along with date last modified, author and file size. I have got the following bit of code to pull back the file names, but i am struggling to find anything that will pull back the other data, I think its something to do with the DIR function, but im not sure........
Range("B1").Select D = ActiveCell Cells(2, 1) = "Filenames" r = 3 f = Dir(D, 7) Do While f "" Cells(r, 1) = f r = r + 1 f = Dir Loop End Sub
I want to create and add-in that will allow a user to select a file (using the in built dialog boxes), the file will then be copied across the network to another server to which the user doesn't have access - I do have access so would hard code in the appropriate username and password in to the script.
The way I had done this before was to look through the users mapped drive to find a free one, map the network drive connecting as myself, save the file and then disconnect the drive.
I am able to map and disconnect the drive, but can't work out how to find an empty drive to use (thus preventing me from overwriting any mappings they may already have).
I was just viewing the VBA to "get a hard drive serial" and would like to know how I can make the serial appear in a cell?
Sub SerialNumber() Dim oFSO As Object Dim drive As Object Set oFSO = CreateObject("Scripting.FileSystemObject") Set drive = oFSO.GetDrive("C:") MsgBox drive.SerialNumber Set oFSO = Nothing Set drive = Nothing 'release memory End Sub
I am trying to get the user to choose which disc the file structure should be stored in. Is it posible to get a dialog box which contains all the disc drives? I tried using the GetOpenFileDialog, but it seems I must choose a file. I must only choose Disc Drive.
Is there a code available that can be used to get the user's computer ID number (Not Computer Name)? I'm using a password generator to randomly generate a password and I would like to use this unique password with the user's Computer ID.
I need to know how to read a filename from my local drive c: ? for example in my local drive i have some 100 files, i need to pick there filename, date and time stamp .. etc.
I need to code an option to overcome the fact that 1 workstation sees all drive letters differently.
I have many macro functions that may refer to "P:My documentsTrucks 2008filename"
However this workstation sees that drive as "T:Trucks 2008filename" and the macro will either not function or cannot find the location to save a copy of action in question.
Can I code an option that will "If filepath not found" ie "P:" go to "T:" etc
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?
I'm trying to make it so that a backup copy of my file is written to floppy when the file is saved (but not with SaveAs). So far, I have the following code, which if the floppy is in the drive works fine, and doesn't error out if the disk is not in the drive. But it doesn't make sure that a backup copy actually got made. How would I check to see if the disk is in the drive and loop somehow until it was so that the file got saved to floppy?
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) On Error Resume Next Application.DisplayAlerts = False If Not (SaveAsUI) Then MsgBox "Please Insert Floppy Disk in Drive A:" ThisWorkbook.SaveCopyAs "A:" & ThisWorkbook.Name End If Application.DisplayAlerts = True End Sub