Thread: Macro Problem
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
John Calder John Calder is offline
external usenet poster
 
Posts: 176
Default Macro Problem



"John Calder" wrote:

Hi

I run WinXP with Excel 2K

I have a number if spreadsheets that have macros in them. They all work
fine. I have created a spreadsheet with a "dashboard" in it. That is to say
it is a spreadsheet with a number of autoshapes (buttons) that have
hyperlinks attached to them that when each one is selected they open the
spreadsheet that they are hyperlinked too. This works fine.

Now for my problem.

I have moved all of the spreadsheets (including the one with the dashboard
in it) onto a server drive. When I select one of the dashboard buttons it
opens the desired spreadsheet on the server. This works ok also. However,
when I close the spreadsheet down that has been opened by the hyperlinked
button is when I have the problem. The spreadsheet closes down ok but after a
couple of seconds the dialog box for the spreadsheet I have just closed
appears back on the screen and asks me if I want to run the macros in the
spreadsheet or not. I can then cancel the dialog box and it disappears but it
should not be opening in the first place. Once I cancel it it does not
reappear.

Is there something that I need to put in the worksheet code that ensure it
does not try to open again once the workbook has been closed?

As I said, I dont have any problems when these files are on my hard drive,
only when they are on the server drive.

Thanks

John


Hi

Additional to the above information

In one of the spreadsheets I have the following code:-

Private Sub UserForm_Activate()
Application.OnTime Now + TimeValue("00:00:020"), "KillTheForm"
End Sub

This activates a splashscreen with a small message when opening the
spreadsheet. As you can see from the code, the splashscreen stays open for 20
seconds then closes. I have noticed that if I let the splashscreen stay on
the screen for the full 20 seconds and then let it close by itself I no
longer have the problem I described above. However if I close the
splashscreen before the 20 seconds is up, I experience the problem.

It seems I need something in the above code that allows me to close the
spalshscreen without it wanting to continue running after the file has been
closed.

Hope this helps


Thanks

John