Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code suddenly won't run on XL2002
Our office uses XL infrequently. We run XL 2000 on all machines except
one, which runs 2002. All machines run WinXP Pro, and nicely. Until today all of them obediently ran the below code, which looks for the alphabetically "highest" file in a given folder and opens it. Sub Workbook_Open() Dim TimesheetFolder As String TimesheetFolder = "C:\TS" With Application.FileSearch .NewSearch .LookIn = TimesheetFolder .SearchSubFolders = False .Filename = Application.UserName & " ??-??*" & "*.XLS" If .Execute() 0 Then Workbooks.Open .FoundFiles(.FoundFiles.Count) End If End With [Error checking code is removed for clarity.] This code is run from an shortcut icon on the Quick Launch bar that points to the containing XL file, which is why it's in a Workbook_Open event. It means one click brings up the user's current timesheet. They like that a lot. Today the 2002 machine won't run the code, unless it's run from an VBA add-in (code assigned to an XL menu or button). Attempting to use the Quick Launch button hangs XL immediately. No error message except during later attempts in the same Windows session that warn it caused a "serious problem" last time it was opened. Obviously, duh, this means it's security-related. Humor me, wise ones. I'm "sure" (!) nothing has changed on that PC -- except of course, that something obviously has! To make it run in the first place (months ago) without a macro warning, I had self-signed each PC's copy of the file via SelfCert. Note: I *didn't* copy a signed file from one PC to the next; I did each on its own machine. This was October, and it worked fine until today. Suspecting a plotzed certificate, I tried to make another. Error message: "Could not create a certificate." Whaa? The affected user really wants her one-click access back. Now she has to open XL first. Doesn't sound so horrible, but the 3 clicks and a wait are irking her badly. Any clues very deeply appreciated. -- Mark Tangard, Microsoft Word MVP "Life is nothing if you're not obsessed." --John Waters |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
XL2002 SUM with a twist... | Excel Worksheet Functions | |||
Semi-hang in XL2002 | Excel Discussion (Misc queries) | |||
Using min and max function XL2002 | Excel Worksheet Functions | |||
Hyperlink Code will not work in XL2002 | Excel Programming | |||
Automating Excel (XL2002) | Excel Programming |