Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Bonni Garcia   on Nov 12 In MS Office Category.

  
Question Answered By: Cambria Lopez   on Nov 12

I am not sure I understand. You say your worksheet  is called HQ and then in the
open event  procedure it seems that you ask to activate the aaHQ?? This by itself
could be the problem

First you can always "neutralize" this line by putting the ' sign before it.
This will make it a remark line. This should give you a clue if this line is the
problem.

The open  event procedure  is only activating a worksheet and then a cell. So the
question is, if not the HQ worksheet which worksheet would you like to activate?
My questions is: do you actually need this procedure altogether?

Have a look at the following code. I hope this could help
Private Sub Workbook_Open()
Dim ws As Worksheet
For Each ws In Worksheets
If ws.Name = "HQ" Then
ws.Activate
Range("a1").Activate
Exit Sub
End If
Next ws
End Sub

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Disable Workbook event procedure with code? Or get search suggestion and latest updates.


Tagged: