Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alternative to SendKeys for field that' not in tab sequence
I'm trying to build a program in Excel that runs a decryption program that's
on about 70 CD's we receive each month. the user has to put the cd in the tray , run the decryption exe file on the disk and enter the password and destination folder. there's just one problem. The destination field is not in the tab sequence. You have to actually click the field to enter the destination folder. Is there someway to automate this? CloseDefaultDiscTray Shell """D:\CompanyName""", vbMaximizedFocus SendKeys "+{TAB}", True ' can't shift tab into destination field...not in tab sequence.!!!!!! SendKeys "C:\Documents and Settings\brogers\Desktop\DecryptionTest" SendKeys "{TAB}" SendKeys "Password", True SendKeys "{Enter}" -- Billy Rogers Dallas,TX Currently Using SQL Server 2000, Office 2000 and Office 2003 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alternative to SendKeys for field that' not in tab sequence
It's not in the correct tab sequence because of when it was added to the
UserForm. The TabIndex property controls the order the controls will be visited in when the Tab Key is pressed. Select the TextBox for the Password and see what its TabIndex number is, then select the control for the Destination Folder and set its TabIndex to one more than the value you got from the Password's control. Tabbing should then work as you want it to. Rick "BillyRogers" wrote in message ... I'm trying to build a program in Excel that runs a decryption program that's on about 70 CD's we receive each month. the user has to put the cd in the tray , run the decryption exe file on the disk and enter the password and destination folder. there's just one problem. The destination field is not in the tab sequence. You have to actually click the field to enter the destination folder. Is there someway to automate this? CloseDefaultDiscTray Shell """D:\CompanyName""", vbMaximizedFocus SendKeys "+{TAB}", True ' can't shift tab into destination field...not in tab sequence.!!!!!! SendKeys "C:\Documents and Settings\brogers\Desktop\DecryptionTest" SendKeys "{TAB}" SendKeys "Password", True SendKeys "{Enter}" -- Billy Rogers Dallas,TX Currently Using SQL Server 2000, Office 2000 and Office 2003 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alternative to SendKeys for field that' not in tab sequence
It's not in the correct tab sequence because of when it was added to the
UserForm. The TabIndex property controls the order the controls will be visited in when the Tab Key is pressed. I meant to add to the above... "The TabIndex is assigned sequentially as the controls are added to the UserForm; however, the TabIndex can be reassigned by you, at any time, as necessary". Rick |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alternative to SendKeys for field that' not in tab sequence
Sorry I don't know if I explained this. The decryption exe is not a program
i wrote. I can't change any of the field properties. there is a brows button I'm going to try to use that...it will just require a heck of a lot of sendkeys to navigate to the correct folder. Thanks, -- Billy Rogers Dallas,TX Currently Using SQL Server 2000, Office 2000 and Office 2003 "Rick Rothstein (MVP - VB)" wrote: It's not in the correct tab sequence because of when it was added to the UserForm. The TabIndex property controls the order the controls will be visited in when the Tab Key is pressed. I meant to add to the above... "The TabIndex is assigned sequentially as the controls are added to the UserForm; however, the TabIndex can be reassigned by you, at any time, as necessary". Rick |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alternative to SendKeys for field that' not in tab sequence
Sorry, I misread your original post. I'm guessing you can't get the original
programmer to change the tab order for you. One thing you can do is see how many Tab Key presses it takes to go from the Password field to the Destination field, then use that number in a single SendKeys function call inside a macro. For example, if it takes 8 Tab Key presses to move from the Password field to the Destination field, this single line of code (placed in a macro subroutine) will execute that many Tab Key presses... SendKeys "{TAB 8}" Change the 8 to the actual number of Tab Key presses required. Rick "BillyRogers" wrote in message ... Sorry I don't know if I explained this. The decryption exe is not a program i wrote. I can't change any of the field properties. there is a brows button I'm going to try to use that...it will just require a heck of a lot of sendkeys to navigate to the correct folder. Thanks, -- Billy Rogers Dallas,TX Currently Using SQL Server 2000, Office 2000 and Office 2003 "Rick Rothstein (MVP - VB)" wrote: It's not in the correct tab sequence because of when it was added to the UserForm. The TabIndex property controls the order the controls will be visited in when the Tab Key is pressed. I meant to add to the above... "The TabIndex is assigned sequentially as the controls are added to the UserForm; however, the TabIndex can be reassigned by you, at any time, as necessary". Rick |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alternative to SendKeys for field that' not in tab sequence
Well the problem is that you can't Tab into the field. the original
programmer left it completely out of the tab sequence. -- Billy Rogers Dallas,TX Currently Using SQL Server 2000, Office 2000 and Office 2003 "Rick Rothstein (MVP - VB)" wrote: Sorry, I misread your original post. I'm guessing you can't get the original programmer to change the tab order for you. One thing you can do is see how many Tab Key presses it takes to go from the Password field to the Destination field, then use that number in a single SendKeys function call inside a macro. For example, if it takes 8 Tab Key presses to move from the Password field to the Destination field, this single line of code (placed in a macro subroutine) will execute that many Tab Key presses... SendKeys "{TAB 8}" Change the 8 to the actual number of Tab Key presses required. Rick "BillyRogers" wrote in message ... Sorry I don't know if I explained this. The decryption exe is not a program i wrote. I can't change any of the field properties. there is a brows button I'm going to try to use that...it will just require a heck of a lot of sendkeys to navigate to the correct folder. Thanks, -- Billy Rogers Dallas,TX Currently Using SQL Server 2000, Office 2000 and Office 2003 "Rick Rothstein (MVP - VB)" wrote: It's not in the correct tab sequence because of when it was added to the UserForm. The TabIndex property controls the order the controls will be visited in when the Tab Key is pressed. I meant to add to the above... "The TabIndex is assigned sequentially as the controls are added to the UserForm; however, the TabIndex can be reassigned by you, at any time, as necessary". Rick |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alternative to SendKeys for field that' not in tab sequence
Does it have an Alt-key shortcut
Regards, Peter T "BillyRogers" wrote in message ... Well the problem is that you can't Tab into the field. the original programmer left it completely out of the tab sequence. -- Billy Rogers Dallas,TX Currently Using SQL Server 2000, Office 2000 and Office 2003 "Rick Rothstein (MVP - VB)" wrote: Sorry, I misread your original post. I'm guessing you can't get the original programmer to change the tab order for you. One thing you can do is see how many Tab Key presses it takes to go from the Password field to the Destination field, then use that number in a single SendKeys function call inside a macro. For example, if it takes 8 Tab Key presses to move from the Password field to the Destination field, this single line of code (placed in a macro subroutine) will execute that many Tab Key presses... SendKeys "{TAB 8}" Change the 8 to the actual number of Tab Key presses required. Rick "BillyRogers" wrote in message ... Sorry I don't know if I explained this. The decryption exe is not a program i wrote. I can't change any of the field properties. there is a brows button I'm going to try to use that...it will just require a heck of a lot of sendkeys to navigate to the correct folder. Thanks, -- Billy Rogers Dallas,TX Currently Using SQL Server 2000, Office 2000 and Office 2003 "Rick Rothstein (MVP - VB)" wrote: It's not in the correct tab sequence because of when it was added to the UserForm. The TabIndex property controls the order the controls will be visited in when the Tab Key is pressed. I meant to add to the above... "The TabIndex is assigned sequentially as the controls are added to the UserForm; however, the TabIndex can be reassigned by you, at any time, as necessary". Rick |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alternative to SendKeys for field that' not in tab sequence
Peter's suggestion is a good possibility.
The programmer may have specified the accelerator key (Alt+key), but forgot to add the "&" to the field label, causing the form to look like there is no accelerator key, when in fact there is one. Try all of the letters in "Destination folder", or whatever the field is labeled (i.e. Alt+D, Alt+e, Alt+s, etc.). -- Regards, Bill Renaud |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SendKeys | Excel Programming | |||
Sendkeys alternative to help with XL Extras - Jim Cone | Excel Programming | |||
Sendkeys alternative to help with XL Extras - Jim Cone | Excel Programming | |||
SendKeys Help | Excel Programming | |||
Alternative to SendKeys | Excel Programming |