Comparing Few Network Computers Folders Against Master Computer?

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


ADVERTISEMENT

How To Get To A Computer On Our Network Using Code

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

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 View Related

Create List Of Drives (local And Network Mapped) On Computer

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

Excel 2010 :: Find Out Permissions On Set Of Folders On Company Network?

Apr 30, 2014

I have been tasked with trying to find out the permissions on a set of folders on a company network. I know write vba code to manipulate a excel spreadsheet without any problems, but it is when i'm using objects that it starts to go beyond my capability. whilst searching i found this code:

Code:
Sub test1()
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const FullAccessMask = 2032127, ModifyAccessMask = 1245631, WriteAccessMask = 118009
Const ROAccessMask = 1179817

[code].....

It does a perfect job but puts the data into an html file. i managed to get it to input the data into the spreadsheet as well but i would like to clean this code up so that it is not producing another file (namely the text file or the html file) and just put the results into the excel file I have entered the module into.

I did start to remove the references to any file name, but that is where i run into trouble and it wouldn't run any more due to object not found.

I'm on Win 7 using Office 2010

View 1 Replies View Related

Use Excel VBA To Copy Multiple Files From Different Source Folders To Different Folders?

Jun 12, 2014

I need to back up files, which may be excel or MSword, by copying them from different directories, say C: to the backup directory, say X:. any vba to backup the files? I expect the vba can copy all file listed in column A.

E.g. C: est1File1.xls or C: est2File2.doc, and then pasted to the directory in column B. e.g. X:BackupFolder1 or X:BackupFolder2.

View 1 Replies View Related

Arrange Or Group Folders Based On Assigned Icons To Folders Using VBA

Dec 20, 2011

I have folders with different assigned folder icons based on the content in the folders.

I would like to arrange these folders in the window based on the assigned folder icons and then by alphabetical order.

How it is to be done. Can we make use of vba having the folders path list in one column of excel sheet?

View 9 Replies View Related

Search Folders And Sub Folders For Worksheet And Return Range?

Jul 8, 2013

macro and I think this has me on my way; however, I do not understand the code and I am having difficulty modifying it. It returns the path in cell $A1 of my workbook, but I get reference errors in $B1:$L1.

I would like for the code to start entering the values in row 2 of my current worksheet. Row 1 I want to make a header row. The first column I like having the file path. Can the path be changed to a hyperlink? I would then like for it to return the values in $AP1:$BC1 to $B1:$O1 of my current workbook.

View 4 Replies View Related

Making Macro That Will Create New Folders And Then Save In Those Folders?

May 21, 2014

I am attempting to create a macro that will create a new folder on the network drive Arie:quotes that will create the new folder and save the the file in the new folder. I need the name of the file and folder to be set to the master (worksheet) cell "B3". and then if possible have it be conditional that if cell "B40" on the same master (worksheet) has a value to have the value added at the end of the filename via hyphen. This workbook has numerous worksheets in it approx 15 worksheets. I am not sure if this is relevant.

As an brief example.

Cell "B3" on the master(worksheet) contains a job name I-40 bridge
So initially I would like the Folder name and file name to be I-40 Bridge

However once the Cell "B40" has been filled in with the value 54213 then I would like the file to renamed to I-40 Bridge-54213 and saved within the same folder.

I am currently working with Excel 2007 Pro edition on windows 8. I

I have found several other macro's that work with an auto save but i am unsure of how to change the directory to the network drive and show the correct file paths. This is the example of the macro I am currently working with.

Public Sub SaveAsA1()
ThisFile = Range("B3").ValueMkDir "C:NewFolder"ChDir "C:NewFolder"ActiveWorkbook.SaveAs Filename:=ThisFileEnd Sub

View 4 Replies View Related

Consolidate Data From Multiple Files Within Folders & Sub Folders

Aug 16, 2009

I have managed to get this far - I have put together a macro (from different threads on this site) that opens closed workbooks, copies data in one of the sheets (same sheet in each of 28 books), and pastes the data it into a master book sheet, each paste starting below the last. So that bit is working. The first bit of help I need is a line of code that will make the macro loop through a number of sub folders in a main folder. My code at the moment works as long as I specify a path that ends with the name of one subfolder, and it only loops through this subfolder. I would like the path to end at the folder that holds all the subfolders ('Workbooks' in the path below), and then add some code that tells it to apply the macro to all subfolders in this folder, so it loops through them all.

The second issue is that after the macro goes to the closed book(s), copies the data in there and pastes it into the master sheet (into columns E:FG), I then need it to go back to the workbook it just copied from, go the same sheet, to three specific cells on that sheet (FH1:FH3), copy the content, go back to the master sheet, and now repeatedly paste the content (values only and transposed) of these three cells into three cells (in columns B:D, with row number being dependent on what rows the first lot of data was copied into) next to every row it just previously pasted in for me. When it loops to the next workbook, it needs to do the same, and the three cells will have different content than the ones in the previous workbook paste.

I dont know how to define the range it needs to paste into the second time. I tried using the definition I used for the first paste (MCDrow), to tell it that it is the same rows, just different columns, but this is not working.

Here is what I have so far, which does the first part of what I need, except for needing a way to have it loop through all subfolder in the 'Workbooks' folder (at the moment it lists Barwon South West as a subfolder in that path, but I actually have multiple subfolders, not all called Barwon South (all different names) that it needs to loop through and do both the first and the second paste for. I have taken out the code I was trying to use to do the second paste, as this was not working and the code is pretty messy as it is (I sort of bumble along, being so new, and I know the code is not very clean or efficient!).

Can someone help me put in the few lines I need to loop through all my subfolders (if you give me an example I can probably extrapolate), but to get you started, three of the subfolders are Barwon South West, Eastern Region and Gippsland. And can someone help me put in the code that will do the second paste for each workbook?

Sub Click2()

Application. ScreenUpdating = True
Dim MCDrow As Long
'Dim SubFolders As String
MCDrow = ThisWorkbook.Sheets("Client Data").Range("A65536").End(xlUp).Row

Fpath = "Q:Clinical ServicesCS Statewide DatabaseWorkbooksBarwon South West" ' change to your directory
'SubFolders = True
Fname = Dir(Fpath & "*.xls")
Do While Fname <> ""

ThisWorkbook.Sheets("Client Data").Unprotect

Workbooks.Open Fpath & Fname
Worksheets("Client Data").Activate
Worksheets("Client Data").Unprotect

View 6 Replies View Related

Loop Through Folders And Create Folders?

Mar 31, 2014

I want to open C:Projects

and for each Project in Projects, create a new folder with the actual month (e.g. "03" or "12")

Im running the Makro from a file where I'd like to put the month in a cell -> so the code refers to cell("A1") wich has value 01 and creates a folder "01" in every projectfolder in C:Projects

View 3 Replies View Related

Calendar Not Working On All Computers?

Dec 4, 2013

This is a shared worksheet. When I look at it I can manipulate the calendar, but for others it is just a non-interactive image.

I'm sure this has something to do with them not having this control in their computer, but is there a work around?

View 7 Replies View Related

VBA HTML Not Running On All Computers?

Jul 23, 2014

So I have this code I'm working on for my deptarment that goes to a website inputs data , clicks run and downloads the csv file to the worksheet. It works just fine on my PC and on my profile on the computers the other department uses. We are both using same versions of windows, excel , and IE. When i have someone from the other department run the macro it opens the website but never enters the data into the fields despite the site being the exact same coding as when i'm logged in.

[Code].....

When this code is ran by a member of the other department it just opens the website inputs nothing and doesn't press the RUN button on the website.

What setting or anything. I verified that both PC's VBA references in are there and no "Locations are missing paths" .

View 1 Replies View Related

Collect Data From Different Computers

Dec 30, 2006

I bought 32 laptops out of my own moeny (used) to get my 5th grade students into the 21st century. I have several programs working on these laptops which output data in text and xls files. I would like to either:

1. Poll the files on each workstation at the end of the day and bring the data into excel (I have worked in VBA). Computers are named Comp01 to Comp33.

2. Better: have the workstations save the files to my NAS device so they are on one hard drive.

I would like to keep it simple (I'm a teacher not a good programmer.) Is the "Import External Data" the way to go for the text files? Can a macro go out and loop through the 32 laptops using that or some other add-in?

View 10 Replies View Related

Directory Names On Different Computers

Aug 3, 2009

I have been limited lately to only working on this project at work because I have added a few lines here and there throughout the workbook that make a reference to the directory the file is located in. for example:

View 2 Replies View Related

Save File To 2 Computers

Mar 6, 2007

I have a timesheet I created in Excel. I want to hit a button and have it save on the current computer. I also want it to copy the file to another computer on our network. I would like it to overwrite the exsisting file on this other computer automatically without a message saying "Do you want to overwrite exsisting file". The other computers dir is \OfficeTimesheet

What code can I write to make this happen?

View 9 Replies View Related

Copy Protection :: On Different Computers

Jan 28, 2008

[url]

Private Sub Workbook_Open()
****'** MsgBox Environ("ComputerName")
****If Environ("ComputerName") UCase("Authorized PC Name") Then
********MsgBox "Sorry No Go!" & vbCrLf & "Wrong computer!"
********End
****Else
********'** Do your thing here
********MsgBox "Proceed"
****End If
End Sub

Reading the thread in the link above, It seems as if one could limit access to a workbook. I tried this code on a dummy workbook, I have a few question...

1. Why am I getting "Sorry, No Go. Wrong Computer" when I just put the code in the dummy worksheet for the first time?

2. Can this code be modified to capture my clients computer information to restrict the workbook useage only on one computer and prevent unauthorized distribution to other computers?

3. Can this code run automatically everytime the workbook is open?

View 9 Replies View Related

Userform Not Working On All Computers

Mar 24, 2009

Private Sub Worksheet_Calculate()
frm_document.Show
End Sub

A userform is called up upon a calculation change in the spreadsheet on two computers and has for years. We just hired a new employee and the userform is not pulling up for her. Instead she gets an error: Runtime error 75...Could not find the specified object.

View 9 Replies View Related

Size UserForm For Different Computers

May 14, 2008

I've created a userform that will be used by multiple users. I'm not finished coding it yet but when I tried to work on it on my computer at home it did not look the same as it did at work. I tried it on several other computers and experienced the same problem.

It appears that the inserted company logo is zoomed in and the some of the label text has wrapped and is not visible.

I've attached a screen shot of the form on my work computer and the way it looks on other computers.

View 5 Replies View Related

Allow Use Of Workbook On Specific Computers Only

Jun 6, 2008

I have a workbook with sensitive company information. I need a way to validate the computer the workbook is being opened on and then close the workbook if it is not a confirmed workstation.

The file is already password protected on opening, each worksheet and the workbook is protected, and the VBA code is protected. We just need to take it one step further.

Is there a way to check a registry entry or the computers MAC address on workbook_open?

I have found code to close the workbook without saving which I would use after a message box stating "You do not have permission to access this file."

If someone has their macro security level set to high or very high, that prevents my code from running. How can I make this work on any computer no matter what their macro settings are?

View 9 Replies View Related

Excel 2010 :: File Different On Two Computers

Jul 7, 2014

I currently have a worksheet opened on excel 2010 using windows XP. When I open the exact same file on another computer using excel 2010 using windows 7. The spacing and formatting is different.

View 3 Replies View Related

Live Editing From Multiple Computers

Dec 5, 2007

Running excel 2002, windows vista (some machines on network are running xp). I have a spreadsheet that I want to be able to edit from all computers on the network so that it shows real time changes on all PC's.

It would be like using google docs, I can't use google docs because my file size is 2.5MB and it is too much for it.

View 5 Replies View Related

Detect/Return Computers IP Address

May 1, 2008

Is there a formula or VBA script available which, when executed, will find the IP address of the computer on which the code / formula is run (obviously - through Excel)?

View 9 Replies View Related

Macro Code Fails On Other Computers/PC's

May 29, 2008

I have a workbook with macros that run on my laptop, but when I email the workbook to another user and the macro is executed I get a subscript out of range message?
Both Excel versions are the same.
Environments are the same.?

View 4 Replies View Related

Compile Error In Hidden Module On Some Computers

Dec 16, 2006

I have a problem i have written an excel macro in VBA and it is working on some computer but on the others it is not working. It says "compile error in hidden module"

View 3 Replies View Related

Excel Document Margins Moved When Viewed On Different Computers

May 1, 2013

I have designed an excel spread sheet for my staff to fill in when completing care plans - there are a lot of drop down boxes etc., on the form - when it comes to printing 3 computers on the office print it fine but the other 3 the margins seem to move and the sheets come out totally wrong - I have checked the setting and we are all using the same setting etc., but it is still happening - we are also all printing to the same printer.

View 1 Replies View Related

Excel 2010 :: Print Area Changes On Same File Between 2 Different Computers?

Jun 6, 2013

I have a technician who sits a desk over, has the same brand of computer running the same Windows 7 and the same Excel 2010, but when he opens a particular file the page layout or print area seems to change so that the sheet is partially cut off. All his options appear the same. I can open this file on other computers and it seems to be fine...

I notice that the Margins under Custom Margins are different and this would explain the problem but not why it occurs. It's a file I created and saved and he opened. Why would the margins change? Is this one of the Microsoft cross platform / program deals where if he changes the print set-up or page layout in WORD for example, it changes them in EXCEL?

View 6 Replies View Related

Protect Excel Files To Open Only On Designated Computers?

Jul 16, 2010

Is it possible to protect an excel file such that it will open up only on designated computers (identified by the computer name or some unique hardware identification like MAC address etc)?I was wondering if the VB editor can be used to do the same.

Let me put my requirement in detail:

I have an excel file "123" created in one computer (named=A). On this computer this file can be opened by anyone.I write a code such a way that, this particular file when copied on to other computers say (B,C & D) would open up as usual. But on computer E or any other computer, it should not open.

I cannot use password protect feature on the file as "n" number of users will be accessing this file on those designated computers. I was finding few of the clients copying the files on their personal drives or email without proper consent.If its possible, I would like to employ the same on few of my word (.doc) files as well.

View 13 Replies View Related

Stop Users Changing Computers Time/Date

Aug 31, 2006

I am creating time sheet application , obviously i need to store the time when the user logs & logs out .. The issue is, the user can "Cheat" by changing the system time ...

Any alternatives?? Is it possible to store the time from a particular server etc or some other source.

View 9 Replies View Related

Application.FileSearch Not Returning Results On Some Pre 2007 Computers

Feb 11, 2008

Found code to find files and return results.. edited to my liking(barely.. i have no VBA knowledge).. it works on the PC I use. This is intended to be on a shared folder across a network for others to use, and it is not returning any results on the other PCs. This computer has Office 2003.. the rest have 2000. I can NOT figure out the problem. I have read in searches that Application.Filesearch is not reliable, but I do not know how to change it to any other type of coding
Attachment 26214

Option Explicit

Sub SrchForMSDS()
Dim i As Long, z As Long, Rw As Long
Dim ws As Worksheet
Dim y As Variant
Dim Fil As String, FPath As String
y = Application.InputBox("Search for file(s) named:", "MSDS Search")
If y = False And Not TypeName(y) = "String" Then Exit Sub
Application. ScreenUpdating = False
With Application.FileSearch
.NewSearch
.LookIn = "\My-SbscompanyMSDS Database"
' \#.#.#.#companyMSDS Databse or My-Sbs
.SearchSubFolders = True
.Filename = y................

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved