Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default Computer freezes when user clicks "enable" macros

I have created a quote template that is all based in userforms, which I
created in XP SP2 with office 2003 SP3. Most users are able to use the
template, however a couple of users are experiencing problems. When they
click on "Enable Macros" at the Security Warning box before opening the
sheet, Excel completely freezes. There is a little bit of code in 'This
Workbook'. The code is:

--------------------------------------------------------------
Option Explicit
Public BooleanForClosing As Boolean
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Unload Formalstep1
Unload Formalstep2
Unload FormalStep3
Unload Quickquote1
Unload Tools
End Sub
Private Sub Workbook_Open()
Dim awb As Workbook
Set awb = ActiveWorkbook
awb.Activate
Sheets("Tools").Range("A1").Value = ""
Dim usrid As String
usrid = Environ("Username")
Sheets("Data").Range("K123").Value = usrid
End Sub
--------------------------------------------------------------
Any glaring reason why they could be hanging? I currently do not know their
OS or Excel version, I've asked them to provide it.

Any help is appreciatable. Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Computer freezes when user clicks "enable" macros

I t may be that shell commands have been disabled on the PC. Try a simple
test. From the Start Button - Select run. Then type into run box cmd.exe
and see if a DOS window opens. The Environ command I think runs cmd.exe. I
know of some companies that have disabled the shell window on PC's.

"Brad" wrote:

I have created a quote template that is all based in userforms, which I
created in XP SP2 with office 2003 SP3. Most users are able to use the
template, however a couple of users are experiencing problems. When they
click on "Enable Macros" at the Security Warning box before opening the
sheet, Excel completely freezes. There is a little bit of code in 'This
Workbook'. The code is:

--------------------------------------------------------------
Option Explicit
Public BooleanForClosing As Boolean
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Unload Formalstep1
Unload Formalstep2
Unload FormalStep3
Unload Quickquote1
Unload Tools
End Sub
Private Sub Workbook_Open()
Dim awb As Workbook
Set awb = ActiveWorkbook
awb.Activate
Sheets("Tools").Range("A1").Value = ""
Dim usrid As String
usrid = Environ("Username")
Sheets("Data").Range("K123").Value = usrid
End Sub
--------------------------------------------------------------
Any glaring reason why they could be hanging? I currently do not know their
OS or Excel version, I've asked them to provide it.

Any help is appreciatable. Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default Computer freezes when user clicks "enable" macros

Thanks Joel. If that is the case, would a simple 'On Error Resume Next' fix
it? Or how would handle it?

Thanks again!

"Joel" wrote:

I t may be that shell commands have been disabled on the PC. Try a simple
test. From the Start Button - Select run. Then type into run box cmd.exe
and see if a DOS window opens. The Environ command I think runs cmd.exe. I
know of some companies that have disabled the shell window on PC's.

"Brad" wrote:

I have created a quote template that is all based in userforms, which I
created in XP SP2 with office 2003 SP3. Most users are able to use the
template, however a couple of users are experiencing problems. When they
click on "Enable Macros" at the Security Warning box before opening the
sheet, Excel completely freezes. There is a little bit of code in 'This
Workbook'. The code is:

--------------------------------------------------------------
Option Explicit
Public BooleanForClosing As Boolean
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Unload Formalstep1
Unload Formalstep2
Unload FormalStep3
Unload Quickquote1
Unload Tools
End Sub
Private Sub Workbook_Open()
Dim awb As Workbook
Set awb = ActiveWorkbook
awb.Activate
Sheets("Tools").Range("A1").Value = ""
Dim usrid As String
usrid = Environ("Username")
Sheets("Data").Range("K123").Value = usrid
End Sub
--------------------------------------------------------------
Any glaring reason why they could be hanging? I currently do not know their
OS or Excel version, I've asked them to provide it.

Any help is appreciatable. Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Computer freezes when user clicks "enable" macros

I don't think so. I believe it is getting hung up in the operating system
and not in Excel. Try it any way. It may be that the computer is missing
the cnd or cmd is corrupted. Replacing the CMD may fix the problem if you
have the correct priledges to make the change.

Do a search on your computer for CMD in the windows directory. I'm not sure
which version of the CMD is being used by Excel.

"Brad" wrote:

Thanks Joel. If that is the case, would a simple 'On Error Resume Next' fix
it? Or how would handle it?

Thanks again!

"Joel" wrote:

I t may be that shell commands have been disabled on the PC. Try a simple
test. From the Start Button - Select run. Then type into run box cmd.exe
and see if a DOS window opens. The Environ command I think runs cmd.exe. I
know of some companies that have disabled the shell window on PC's.

"Brad" wrote:

I have created a quote template that is all based in userforms, which I
created in XP SP2 with office 2003 SP3. Most users are able to use the
template, however a couple of users are experiencing problems. When they
click on "Enable Macros" at the Security Warning box before opening the
sheet, Excel completely freezes. There is a little bit of code in 'This
Workbook'. The code is:

--------------------------------------------------------------
Option Explicit
Public BooleanForClosing As Boolean
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Unload Formalstep1
Unload Formalstep2
Unload FormalStep3
Unload Quickquote1
Unload Tools
End Sub
Private Sub Workbook_Open()
Dim awb As Workbook
Set awb = ActiveWorkbook
awb.Activate
Sheets("Tools").Range("A1").Value = ""
Dim usrid As String
usrid = Environ("Username")
Sheets("Data").Range("K123").Value = usrid
End Sub
--------------------------------------------------------------
Any glaring reason why they could be hanging? I currently do not know their
OS or Excel version, I've asked them to provide it.

Any help is appreciatable. Thanks.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"openinf file..."ENABLE MACROS...DISABLE MACROS" F. Lawrence Kulchar Excel Discussion (Misc queries) 3 September 12th 06 10:33 AM
Error when user clicks "no" JT Excel Programming 3 August 8th 06 05:03 PM
"Enable, Disable macros" window does not pop up, security is medi Miguel Montes[_2_] Excel Programming 1 July 27th 06 02:01 PM
Excel 2004 for Mac freezes if I enable "drawing" toolbar KevinW Excel Discussion (Misc queries) 2 April 23rd 06 12:20 AM
Code to ignore on-screen message concerning "Enable Macros." Phil Hageman[_3_] Excel Programming 2 February 26th 04 01:51 PM


All times are GMT +1. The time now is 06:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"