Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default VB code stalls when file is shared

Is there a way to view the VB code and step through the procedure while the
Workbook is Shared?

What's happening is:
When the workbook is not shared, the code runs fine. But when it is shared,
the computer's processor revs-up and the fans kick in and the application
just hangs. The code is not complex. This is a combo box on a form. And
when it changes, I have the following code to run. In attempt to rule out
vigorous calculation, as you can see, I've set it to manual. Any ideas why
this would cause the system to hang when the file is shared?

Private Sub ModelGroup_Change()
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Sheets("ModelsDataSheet").Activate
'SWSubForm.ModelName.Text = Range("K1").Value


Range("E1").AutoFilter Field:=1
Range("K2:K65536").ClearContents
Range("E1").AutoFilter Field:=1,
Criteria1:=SWSubForm.ModelGroup.Text
Range("F2:F" & Range("F65536").Row).Copy
Range("K2").Select
ActiveSheet.Paste

Sheets("Submission Log").Activate
Application.ScreenUpdating = True

End Sub


Thanks in Advance,
Paul

--



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 91
Default VB code stalls when file is shared

On Apr 15, 11:26*am, "PCLIVE" wrote:
Is there a way to view the VB code and step through the procedure while the
Workbook is Shared?

What's happening is:
When the workbook is not shared, the code runs fine. *But when it is shared,
the computer's processor revs-up and the fans kick in and the application
just hangs. *The code is not complex. *This is a combo box on a form. *And
when it changes, I have the following code to run. *In attempt to rule out
vigorous calculation, as you can see, I've set it to manual. *Any ideas why
this would cause the system to hang when the file is shared?

Private Sub ModelGroup_Change()
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Sheets("ModelsDataSheet").Activate
'SWSubForm.ModelName.Text = Range("K1").Value

* * * * Range("E1").AutoFilter Field:=1
* * * * Range("K2:K65536").ClearContents
* * * * Range("E1").AutoFilter Field:=1,
Criteria1:=SWSubForm.ModelGroup.Text
* * * * Range("F2:F" & Range("F65536").Row).Copy
* * * * Range("K2").Select
* * * * ActiveSheet.Paste

Sheets("Submission Log").Activate
Application.ScreenUpdating = True

End Sub

Thanks in Advance,
Paul

--


From my experience it's --because<-- the file is shared. You may
want to try unsharing the file, running the code, and then resharing
it. But, I doubt that's an option for you since it's a combobox.
Sounds like it's an end-user process rather than an admin one run by
you. It's because of this sharing thing that I typically don't share
files unless it's required. Running code takes many times longer and
eats up processing power because of sharing.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default VB code stalls when file is shared

Macros and shared workbooks don't get along. Sharing is essentially a form of
protection that can only be removed when you have exclusive access to the
file. Since you are dealing with a protected file macros are very limited. I
have not tried your code but if it is not working properly it is safe to
assume that your code does not function in a shared workbook.

That is just one reason why I never use shared workbooks. It seems to be
almost a universal trueth that anyone with a lot of experience in XL avoids
shared workbooks.
--
HTH...

Jim Thomlinson


"PCLIVE" wrote:

Is there a way to view the VB code and step through the procedure while the
Workbook is Shared?

What's happening is:
When the workbook is not shared, the code runs fine. But when it is shared,
the computer's processor revs-up and the fans kick in and the application
just hangs. The code is not complex. This is a combo box on a form. And
when it changes, I have the following code to run. In attempt to rule out
vigorous calculation, as you can see, I've set it to manual. Any ideas why
this would cause the system to hang when the file is shared?

Private Sub ModelGroup_Change()
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Sheets("ModelsDataSheet").Activate
'SWSubForm.ModelName.Text = Range("K1").Value


Range("E1").AutoFilter Field:=1
Range("K2:K65536").ClearContents
Range("E1").AutoFilter Field:=1,
Criteria1:=SWSubForm.ModelGroup.Text
Range("F2:F" & Range("F65536").Row).Copy
Range("K2").Select
ActiveSheet.Paste

Sheets("Submission Log").Activate
Application.ScreenUpdating = True

End Sub


Thanks in Advance,
Paul

--




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
VBA code shared between .XLS files BitTwiddler Excel Discussion (Misc queries) 2 March 20th 09 04:04 PM
Shared VBA code between workbooks Vindaloo[_7_] Excel Programming 1 August 22nd 06 03:16 PM
VBA Script in Excel Stalls Out On It's Own After Opening Secondary Excel File SilentThunder Excel Programming 1 September 20th 05 10:32 AM
VBA Script in Excel Stalls Out On It's Own After Opening Secondary Excel File SilentThunder Excel Programming 1 September 19th 05 10:29 PM
VB Code Works Perfect...but Not when the File is Shared TEAM[_4_] Excel Programming 3 September 15th 05 04:55 PM


All times are GMT +1. The time now is 01:30 PM.

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

About Us

"It's about Microsoft Excel"