Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
jc jc is offline
external usenet poster
 
Posts: 164
Default Workbook.activate acts dif when activewindow.caption changed

Thanks Ken

JC
--
CroceJC


"Ken" wrote:

jc

How do you know it is only the second me.activate that changes the
active sheet? It looks like the first one does it for me.

Try this

Sub test()
Me.Activate
MsgBox "what is the active sheet?"
ActiveWindow.Caption = "help xxxxx"
MsgBox "what is the active sheet now?"
Me.Activate
End Sub

Ken

On Jun 12, 3:01 pm, jc wrote:
Again this is the situation

I open a new workbook with more than one sheet.
I acitvate a sheet other than sheet(1)
I enter the following code in the workbook code

Sub test()
Me.Activate
ActiveWindow.Caption = "help help"
Me.Activate
End Sub

upon execution:

The first Me.Activate does not change the active sheet

The second Me.Activate changes the active sheet to Sheet(1)

=========================================

It is not part of an event and it is the me.activate that is changing the
active sheet to the sheet(1) which I believe is not normal behavior.

Can someone please replicate and confirm or deny.
--
JC



"Ken" wrote:
jc


I changed the active window caption using the immediate panel in Excel
2003. That does not seem to effect the the activewindow when activate
the workbook for me.


How are you changing the caption? How are you activating the
workbook? There could be something else going on if you are doing
that event code.


Ken


On Jun 12, 2:11 pm, jc wrote:
I am using EXCEL 2003


Did you set ActiveWindow.Caption to something different first?
--
JC


"Joel" wrote:
The activesheet isn't changing on Excel 2003


"jc" wrote:


Normally the active sheet in a workbook doesn't change when the workbook is
activated.


After setting the ActiveWindow.Caption to something new:


Workbook.activate changes the active sheet to Worksheets(1) no matter what
the previous active sheet was.


Can someone confirm this behavior?


Can someone explain this?


Can someone comeup with way to regain normal behavior?
--
JC- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -



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
Activate speech when sheet is changed faureman via OfficeKB.com Excel Programming 2 August 25th 07 12:02 AM
Can Multiple Range Pivot Table's field button's caption be changed Jac Excel Discussion (Misc queries) 1 June 10th 07 11:09 AM
Change Worksheet Button Caption on Worksheet.Activate MikeZz Excel Programming 1 December 7th 06 06:01 AM
Workbook.Activate / Window.Activate problem Tim[_44_] Excel Programming 3 February 3rd 06 11:38 PM
How can the caption of a (button) shape (not cmd) be changed from VBA AnExpertNovice Excel Programming 7 December 7th 05 06:20 PM


All times are GMT +1. The time now is 09:19 AM.

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"