Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default I may have found (yet another) bug in Excel

I have assigned a HelpContextID to all TextBoxes in my Excel 2002
program, and my home-crafted help system works perfectly. When
I tried to do the same for their corresponding Labels, Excel bombed.
Would some of you set up the following very simple experiment to
confirm what I've encountered (or explain what I'm doing wrong):

Set up UserForm1 with three controls: Label1, TextBox1, and
CommandButton1. In the Properties module set the HelpContextID
for TextBox1 to 101 and the HelpContextID for Label1 to 102, say.
In the code module do the following:

Private Sub CommandButton1_Click()
MsgBox UserForm1.TextBox1.HelpContextID
MsgBox UserForm1.Label1.HelpContextID
End Sub

Sub Auto_Open()
UserForm1.Show
End Sub

Load the program and click the command button. A message
box comes up with the number 101 displayed, as it should;
dismiss the message box and then what happens to me is
that an error message comes up saying "Member not found."

-- Dennis Eisen
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default I may have found (yet another) bug in Excel

Dennis,

I get the same results, and a search on Google also suggest that you cannot
write to the property at run-time. So read/write at run time seems a no-no.

It does seem to be a bug, but to me the bug is that there is a HelpContextId
at all. As a label cannot take focus, you cannot do an F1 Help on a label,
so having HelpContexId seems redundant.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"DennisE" wrote in message
...
I have assigned a HelpContextID to all TextBoxes in my Excel 2002
program, and my home-crafted help system works perfectly. When
I tried to do the same for their corresponding Labels, Excel bombed.
Would some of you set up the following very simple experiment to
confirm what I've encountered (or explain what I'm doing wrong):

Set up UserForm1 with three controls: Label1, TextBox1, and
CommandButton1. In the Properties module set the HelpContextID
for TextBox1 to 101 and the HelpContextID for Label1 to 102, say.
In the code module do the following:

Private Sub CommandButton1_Click()
MsgBox UserForm1.TextBox1.HelpContextID
MsgBox UserForm1.Label1.HelpContextID
End Sub

Sub Auto_Open()
UserForm1.Show
End Sub

Load the program and click the command button. A message
box comes up with the number 101 displayed, as it should;
dismiss the message box and then what happens to me is
that an error message comes up saying "Member not found."

-- Dennis Eisen



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default I may have found (yet another) bug in Excel

Thanks much for responding to my inquiry. It is true
enough that a label cannot take a focus and hence no way to
summon help by pressing the <F1 key. What I was trying to do
is to develop my own help system wherein by clicking on the
label, a call to my own help subroutine, say HelpMe (N), would be
issued with the label's HelpContextID parameter serving to identify
where the call came from. For example,

Sub UserForm1.Label1_Click()
HelpMe UserForm1.Label1.HelpContextID
End Sub

As is now verified, that won't work, so my workaround
has been to simply to change the code to read:

Sub UserForm1.Label1_Click()
HelpMe UserForm1.TextBox1.HelpContextID
End Sub

In this manner, users can bring up a help screen in
either of two ways: by pressing <F1 while the
insertion point is in the TextBox (as it has the focus),
or by clicking on the label next to the TextBox. The
coding is very easy as I've made sure that all TextBoxes
and their corresponding Labels are similarly named
(that is Label34 goes with TextBox34, etc.).

-- Dennis Eisen
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
Bug Found in Excel 2007 nick fiechter Excel Discussion (Misc queries) 4 November 30th 09 07:25 PM
excel can't be found trying to solve a problem in excel Excel Discussion (Misc queries) 0 December 21st 06 04:37 PM
Found a SERIOUS bug in Excel !!! irresistible007 Excel Worksheet Functions 2 November 28th 05 10:38 AM
I think I've found a bug in Excel 2003 Dab Excel Discussion (Misc queries) 2 May 11th 05 08:53 PM
File Not Found msg when run Excel roadkill Excel Discussion (Misc queries) 1 April 4th 05 09:35 PM


All times are GMT +1. The time now is 08:03 AM.

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"