 |

03-11-2005, 07:48 PM
|
|
Newcomer
|
|
Join Date: Feb 2005
Posts: 24
|
|
How to know which dialog is now active?
|

03-11-2005, 10:12 PM
|
 |
Down...
Retired Moderator * Expert *
|
|
Join Date: Dec 2002
Location: Belgium.
Posts: 6,731
|
|
basilizak,
If you expect the best possible help from the other forum members, it might be helpful for them, if you would give us a more discriptive explanation of what exactly you want...
Thanks, and welcome 
|
|

03-12-2005, 01:43 AM
|
|
Newcomer
|
|
Join Date: Feb 2005
Posts: 24
|
|
|
i want to make a sofeware to record user 's process in excel, and using another sofeware to simule this process and show to us.
usually , the user do sth from the menu, it can show some dialogs . but i can't record any thing when the dialog is active. so i want to find a way to know which dialog is open , and record it.
thanks.
|
|

03-12-2005, 01:57 AM
|
 |
Regular
|
|
Join Date: Feb 2002
Location: Shanghai
Posts: 77
|
|
If you are talking about built-in dialogs, you may want to:
1) define a Public variant to record the active dialog's name
Code:
Public strActiveDialog as String
2) whenever a dialog is called, you can in your code do the following:
Code:
strActiveDialog = theNameOfDialog
Just a thought of it, this is not a complete answer, as it may seem to you...
|
__________________
I don't read. I just think.
Last edited by SubFunction; 03-12-2005 at 02:21 AM.
|

03-12-2005, 03:04 AM
|
|
Newcomer
|
|
Join Date: Feb 2005
Posts: 24
|
|
|
that can not solute my problem.
1. i don't know the time when the dialog is calling, because , the user control it , not me.
2. some built-in dialogs 's name can find with its commandname, e.g dialogs(i).commandname, but some dialogs , i can find its name, i don't know whether the way is correct, i use ....
for i=1 to 65535
sheets(1).cells(i,1)=dialogs(i).commandname
next
with this , i can find some dialog ,it can show from menu.
|
|

03-12-2005, 03:24 AM
|
 |
Regular
|
|
Join Date: Feb 2002
Location: Shanghai
Posts: 77
|
|
Quote:
|
Originally Posted by basilizak
that can not solute my problem.
1. i don't know the time when the dialog is calling, because , the user control it , not me.
2. some built-in dialogs 's name can find with its commandname, e.g dialogs(i).commandname, but some dialogs , i can find its name, i don't know whether the way is correct, i use ....
for i=1 to 65535
sheets(1).cells(i,1)=dialogs(i).commandname
next
with this , i can find some dialog ,it can show from menu.
|
Well, for your concern (1) I would say, yes, the user decides when to call up the dialog in some cases. However, if you are doing things as VBA programmer, you can of course make the recording of the dialog name happen:
Code:
strActiveDialog = "somename"
dialogs(x).show ' I don't remember the precise syntax as I don't have Excel at hand. :-(
Actually your concern (2) relates to how to determine the "somename". Of course you can name the dialog at your own discretion if only for the purpose of recording the dialog. For example, you can name the "open file" built-in dialog as
strActiveDialog = "Anyway I know it's a dialog for me to open an file though I don't know what the Microsoft Excel programmers originally name it"
|
__________________
I don't read. I just think.
|

03-12-2005, 07:23 AM
|
|
Newcomer
|
|
Join Date: Feb 2005
Posts: 24
|
|
|
i don't know what you said as you don't know what i said.
i want to write a code with VBA like a spy to record any user using my workbook. so i don't know anything the user want to do. i want to know where he is clicking , which menu bar he is choocing , and i want to know which dialog is showing , and the button ,check box ,in this dialog , is using by user.
|
|

03-12-2005, 07:40 AM
|
 |
Unashamed geek
Retired Moderator * Expert *
|
|
Join Date: Jul 2003
Location: London, England
Posts: 8,988
|
|
|
That is not doable in VBA.
|
|

03-12-2005, 07:46 AM
|
 |
Regular
|
|
Join Date: Feb 2002
Location: Shanghai
Posts: 77
|
|
Basilizak,
If you want to record the movements of the user rather than to know the "result" of the movements and if you want to do it by programming in VBA itself, I would say, it would be quite difficult, if not impossible at all.

|
__________________
I don't read. I just think.
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|