Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 417
Default 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
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
SendKeys Steven van Hell Excel Programming 1 July 6th 07 10:47 AM
Sendkeys alternative to help with XL Extras - Jim Cone Mike K Excel Programming 5 March 28th 07 02:51 AM
Sendkeys alternative to help with XL Extras - Jim Cone Gary''s Student Excel Programming 0 March 27th 07 11:40 PM
SendKeys Help ajvasel Excel Programming 2 August 9th 06 04:48 PM
Alternative to SendKeys Garry Rathbone Excel Programming 1 July 28th 04 12:36 PM


All times are GMT +1. The time now is 01:48 PM.

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"