Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello experts,
I'd like to find a method/script to only execute an excel macro based on a users existing file listing on their computer ( or it could be a pre-existing setting; ie. their IP or MAC address). Ideally I'd like to have a macro check for the existence of a certain file (or password phrase encoded in the file) on the directory of a users computer, if YES then execute macro, ELSE don't do anything. This is all done in the background right before the event that usually triggers the primary macro, which is an ftp command line script. My guess is creating a batch file that executes in a windows shell and outputs a value that could be read, but I'm not sure if that's the best way to achieve what I want. I want to avoid using a pop-up form and password inside the excel file - this is currently what I already have. Thank you for your help, -Doug Jr. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Seems to me your "ideal" solution is pretty easy. You've never worked with
the FileSystemObject? Use CreateObject("Scripting.FileSystemObject") to create an object which you can subsequently use to check for the existance of a path or file and, if you choose, to read the contents of a file. Full documentation on the FileSystemObject is in the CHM for both VB and VBS. I can send you a copy if you don't already have one yourself - though you probably do, hidden away somewhere. --- "Daddy Mac will make ya JUMP JUMP" wrote: I'd like to find a method/script to only execute an excel macro based on a users existing file listing on their computer ( or it could be a pre-existing setting; ie. their IP or MAC address). Ideally I'd like to have a macro check for the existence of a certain file (or password phrase encoded in the file) on the directory of a users computer, if YES then execute macro, ELSE don't do anything. This is all done in the background right before the event that usually triggers the primary macro, which is an ftp command line script. My guess is creating a batch file that executes in a windows shell and outputs a value that could be read, but I'm not sure if that's the best way to achieve what I want. I want to avoid using a pop-up form and password inside the excel file - this is currently what I already have. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Also try this link:
http://groups.google.com/group/micro...5f86 59626ff9 -- urkec "Daddy Mac will make ya JUMP JUMP" wrote: Hello experts, I'd like to find a method/script to only execute an excel macro based on a users existing file listing on their computer ( or it could be a pre-existing setting; ie. their IP or MAC address). Ideally I'd like to have a macro check for the existence of a certain file (or password phrase encoded in the file) on the directory of a users computer, if YES then execute macro, ELSE don't do anything. This is all done in the background right before the event that usually triggers the primary macro, which is an ftp command line script. My guess is creating a batch file that executes in a windows shell and outputs a value that could be read, but I'm not sure if that's the best way to achieve what I want. I want to avoid using a pop-up form and password inside the excel file - this is currently what I already have. Thank you for your help, -Doug Jr. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here's a link of the sort I was looking for (or rather "talking about" - I
didn't bother to look for it) last night. This lists a number of functions that enable VBScript to get data about the machine it's running on: http://msdn.microsoft.com/en-us/libr...53(VS.85).aspx If you explore around a little you'll probably also find, in nearby links on their tree, more information of the same sort. --- "Daddy Mac will make ya JUMP JUMP" wrote: I'd like to find a method/script to only execute an excel macro based on a users existing file listing on their computer ( or it could be a pre-existing setting; ie. their IP or MAC address). Ideally I'd like to have a macro check for the existence of a certain file (or password phrase encoded in the file) on the directory of a users computer, if YES then execute macro, ELSE don't do anything. This is all done in the background right before the event that usually triggers the primary macro, which is an ftp command line script. My guess is creating a batch file that executes in a windows shell and outputs a value that could be read, but I'm not sure if that's the best way to achieve what I want. I want to avoid using a pop-up form and password inside the excel file - this is currently what I already have. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can a macro be set for mutiple users on one computer in Excel 20? | Excel Discussion (Misc queries) | |||
TRANSPORT SETTINGS TO ANOTHER COMPUTER | Excel Programming | |||
Add-Ins and Multiple Users on 1 Computer | Excel Discussion (Misc queries) | |||
How do I execute a macro based on the value of a cell in Excel? | Excel Discussion (Misc queries) | |||
How can I get a macro to execute in excel based on the value of a. | Excel Programming |