Macro Does Not Run On Different Computer In Same Network
Jan 20, 2007
I wrote a macro that runs perfect when started from my pc, but if started from a different ps which is logged into the same network it doesn't run, also the macro is stored on the server. I have a code in the private section of the workbook:
Private Sub Workbook_Open()
Call FINAL
End Sub
then the macro 'FINAL' is stored in the 'Modules' section and starts with:
Sub FINAL()
'this part opens the Edit/Links dialog from which the user has to choose the relevant model
Dim Which_financial_model_contains_the_data As String
ActiveWorkbook.ChangeLink Name:= _
"T:DEALSSSalsa (Project)Financial modelsProject Salsa Model - BASED ON SPONSOR CASE - b - 20061214.xls" _
, NewName:= _
"Which_financial_model_contains_the_data" _
, Type:=xlExcelLinks
View 6 Replies
ADVERTISEMENT
Jan 29, 2007
I have code below that works well most of the time. One of the cases below will not work. It insists on requiring a name and password.
(note: it is the only Windows 2000 operating systems)
I want to enter this in my case line to automatically add the username and password.
Let's say the username is: "dave" and the password is: "happy"
How can I add this to this part of the code?
Case "DJ"
strfilename = "\DAVEJONESDavesProposals" & strfilename
Sub Save_and_SaveSalesman()
Dim strPath As String, strPath2 As String, CurrPath As String
Dim WB1 As Workbook
Dim WB2 As Workbook
View 9 Replies
View Related
Jan 26, 2014
I've been tasked with writing an excel spreadsheet that will compare A directory from a "Master directory" against another networked computer directory...
Master Directory
R_PC1
R_PC2
R_PC3
[Code]....
So what were trying to do is have the table show us which pc has a file that either
1) Does not show up on the master
2) Matches the master file name but the file size is different
3) Matches the master file name but the time stamp is different (Show if its Newer or Older)
4) Shows up on the master but does not show up on the remote.
The amount of rows will be between 3000 and 5000 .
View 9 Replies
View Related
Nov 5, 2012
how to create a list of the drives on my computer using VBA. Maybe I missed something.
View 2 Replies
View Related
Jun 28, 2007
a macro to get the computer ID of the computer where the excel file is opened?
View 9 Replies
View Related
Mar 6, 2014
Can a macro create a folder in my computer and use the value in cell A1 as the folder name? This is where I want the folder to be created C:UsersUserDesktop.
View 8 Replies
View Related
Sep 12, 2006
why the Function & Property Get below is used to return the username and computer name when the Environ method does exactly the same in only two lines of code.
I would sooner use the Environ method but not if there is a valid reason why the function is used.
Option Explicit
Private Declare Function GetUserName Lib "advapi32.dll" _
Alias "GetUserNameA" ( _
ByVal lpBuffer As String, _
ByRef nSize As Long) As Long
Private Declare Function GetComputerName Lib "kernel32.dll" _
Alias "GetComputerNameA" ( _
ByVal lbbuffer As String, _
nSize As Long) As Long
Public Property Get UserName() As String
Dim stBuff As String * 255, lAPIResult As Long
Dim lBuffLen As Long
View 3 Replies
View Related
Jan 26, 2010
I currently have the following ...
View 8 Replies
View Related
Jan 12, 2008
I would like to include code to move or copy various csv files from one computer across a network to other computers.
To date the best I have come up with is a method of running a batch file that executes the action.
Sub moveTKRS()
Call Shell("C:MoveTKRS.bat", vbNormalFocus)
End Sub
I would rather a more direct code that does not require a batch file.
View 9 Replies
View Related
Aug 10, 2007
In my macro I need to open to paths. the 1st path I I have working. Here is the
Dim OpenA As Workbook, OpenB As Workbook
Dim TheFile As String
Dim TheFile2 As String
ChDrive "H:"
ChDir "H:Treasury Project"
TheFile = Application. GetOpenFilename("Excel Files (*.xls), *.xls", , "Select the file and choose open.")
If TheFile = "False" Then
Exit Sub
End If ...............
The "????" are where I don't know what to do. I used a test path to make sure all code works and it does, but the real path is a network location. When I go to it manually with excel this is where it shows me to have gone: My Net Work Places, Entire Network, Microsoft Windows Network, Company2, datawhse, root, LAW81, Lawson, Print, Name. If I open a file and do =cell("filename") it gives me \datawhse
ootLAW81LAWSONprintNameanrvwfins111thSSFRPMOEDTL.csv. Is it possible to get excel to open me up to ...\datawhse ootLAW81LAWSONprintName.
View 6 Replies
View Related
Jan 20, 2012
Designing very simple macro, it simply trims of some bits from the spreadsheet.
I paste special the trimmed cells over the top of the existing cells.
The macro works fine on my computer.
I took the code from my computer and put it on the other persons computer. The macro didn't work claiming issue with the paste special.
View 7 Replies
View Related
Jan 5, 2014
I am an extreme novice to using macros.
I used the 'record macro' feature to create the following: I created a rectangle box on sheet1 of NEW TEST.xlsm to link to the macros incidated below. Niether macro moves on after reaching the Workbooks.Open statement.
I am at a loss. Is there something in Excel that needs to be set? Is there something else that I need to do version of Excel is 14.0.6129.5000 (32 bit) MS Office Professional Plus 2010
What I am trying to accomplish is this: From 'NEW TEST.xlsm', open an excel file on the network, add a new sheet to this network file, calling it 'Pivot'. Then create a pivot table in this new sheet from the data in sheet data1 of this same network file. Then move control of macro / processing back to the NEW TEST file. Eventually I will do more, but for starters, I cannot even get the macro to add / name a new sheet in the network file.
[SIZE=3][COLOR=#000000][FONT=Arial]PS I have attached the NEW TEST.xlsm fikle as we as the data file. NOTE: the data file has been reduced to one day's worth of data, to to the upload file size.Also, my Excel Trustred locations has "Allow trusted locations on my network" checked, and the network location to the data file in trusted user locations.
VB:
Sub Open_Add_Sheet()
Dim filename, filelocation As String
Dim wb As Workbook
filename = "11 Nov, 2013 GDO AHS Agent Productivity Report.xls"
filelocation = "R:acharukAHS ReportsGDOGDO CSR ACTIVITY Report2013" & filename
Set wb = Workbooks.Open(filelocation) '
' Open_Add_Sheet Macro
[Code]....
View 9 Replies
View Related
Aug 1, 2014
I have a macro that works just find on my local machine. but it need to run from a network drive as several different people may need to access it.
A brief description of the macro.
The macro looks in an directory called unprocessed for any file named "*.csv" if the files are found it opens the file in excel and then copies data from that workbook to my workbook. after this the .csv file is closed (unchanged) and then it is moved to the processed directory.
Sub files()
Dim directory As String, filename As String, sheet As Worksheet, i As Integer, j As Integer
Dim filetype As String
Application.ScreenUpdating = False
[Code].....
View 7 Replies
View Related
Mar 5, 2008
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.
View 9 Replies
View Related
Mar 10, 2006
I have a problem running an excel macro on different laptops because the IP needs to be known (my program links to databases that are installed on a "server" laptop). The IP can be sourced by using the "Start, Run, cmd, ipconfig" but my users can have problems with process.
Does anyone know of a vb function that will display the ip of the computer that the code is run on?
View 9 Replies
View Related
Sep 8, 2007
i am experiencing runtime error '6': overflow on one computer but not on another computer when it is the exact same file running on two different computers.
View 9 Replies
View Related
Apr 5, 2008
Is there a code or formula to get the name of my Computer?
View 9 Replies
View Related
Jan 15, 2003
Is there any way to return the name of the computer in Excel using VB?
View 9 Replies
View Related
Feb 9, 2009
Does anyone have a macro that could assign a 16-digit number, seperated by dashes, to a computer? (i.e. Computer ID: xxxx-xxxx-xxxx-xxxx)
View 9 Replies
View Related
May 9, 2014
Here's the scenario. A co-worker and I access the same file from the same online database and download it in the same manner. We have the same version of excel. We then open these identical files, we run a formatting macro (identical), but when it comes time to set the page breaks in order to get the items to print on the same page I have to increase a columns width to make it fit on one page and yet it still doesn't match theirs. It appears to have a different scale but I'm not sure of the option difference between our machines. I don't know how it could be the printer since it physically gives her different page break option than what mine does.
View 1 Replies
View Related
Jan 5, 2013
I have a Age calculating formula in an excell cell, which calculates the age as on another date.
The forumala is =IF(E4="","",IF($C$1="","",ROUNDDOWN(($C$1-E4)/365,0))) where E4 is the date of birth and C1 is the date in which I want the age calculated to be.
The above formula works very well on my computer, but does not on any other computer. If I access it from my sent items or from a shared drive, it works perfectly on mine, but not on any other computer!!! I get a #value error message on all other computers.
I have tried the foll:
If i enter =ISNUMBER(C1) where the age has to be calculated, I get #Name?
If I enter =ISNUMBER(E4), i get TRUE
The above is on the sheet where it does not work ( on others computer ) and i get TRUE for both on mine. Also both have the same date formats and same time zones...
View 10 Replies
View Related
Jul 8, 2014
I am having trouble with transferring a Macros to another computer. I have saved and sent the file via e-mail as a .xls and .xlsm to no avail and tried other methods of transferring the macros to the other computer. Also No I cannot copy paste the coding information to the other computer since there are multiple macros buttons since they are add one item and subtract one item from separate rows for inventory at a warehouse (about 100+ rows x 2 = about 200+ macros buttons).
View 1 Replies
View Related
Sep 9, 2009
I have few macros that I use to reconfigure a particular workbook into a sort of "developer mode". I keep them in a text file that I can paste them from when I'm working on it and then delete them before I send it out to other people.
I'd like to be able to script them so they only run if the workbook is open on a specific machine (namely mine). Is there any way to identify the specific computer a spreadsheet is being run on?
View 2 Replies
View Related
Sep 11, 2009
I want to transfer my Excel-icons. Some of them are custom buttons where I have added user-defined functions. Is there any way I can do this? A list of icons with their function or purpose is OK as well.
View 4 Replies
View Related
Nov 12, 2009
I have a odd problem. I have workbook that I made I placed this formula in cell A1
View 3 Replies
View Related
May 22, 2013
I have made a program using excel vba with userforms, however upon using it on another or any computer with the same version of Office(2007) i am getting a debugging error and highlighting any lines with the words "format" & "date" in the vba code.
View 3 Replies
View Related
Jul 22, 2014
I created a code and I just changed computer. The code that was working perfectly fine on my previous laptop is no longer working now.
Workbooks.Add
ActiveWorkbook.SaveAs Filename:= _
"C:UsersUserDocumentsBCB MANAGEMENTBankArchiveData_TenantsData_Tenants_" & Left(strDate, 8) _
, FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
Set wbData = Workbooks("Data_Tenants_" & Left(strDate, 8))
When it reaches Set wbdata it says subscript out of range. I'm not sure how it cannot recognise the spreadsheet I just created and that is open and working.
View 5 Replies
View Related
Apr 17, 2008
Using some custom VB code to put the filename of the document into a cell.
I save the spreadsheet and load it up on another computer and all I get is #VALUE.
How do I fix this so its loaded on every machine without problems? (Multiple people will be using these sheets)
View 9 Replies
View Related
Oct 14, 2008
I've a workbook (XL 2003) test-1.xls, and I need to restrict it to a specific computer with ID: my-a1234567k
(shown under ControlPanel::System::Computer Name::Full computer name).
Is it possible to code such restriction in the w/b Open() event to prevent opening the w/b on a different computer?
My computers each has a different OS (Win 2000, Win XP Home, Win XP Prof ), different Excel version (XL 2000, 2003, 2007), etc., and the majority of my workbooks have been developed and would work only in certain environment (e.g.; in XL 2003 only, or XL 2007 only, ... ).
View 9 Replies
View Related
Feb 13, 2009
I'm running Excel 2007 with Windows Vista. I also have Excel 97, which I was told would not run with Vista. I've since discovered that many programs that I was told wouldn't run with Vista seem to work fine.
Is it possible to install Office 97 on the same machine with Office 2007?
View 9 Replies
View Related