Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default User form OK command automate


Is there some line I can include in a form that does the 'click' o
click OK for me. I have a form that processes some data, and since
know the data well, I just want the forms to be processed (about 500 o
them) on a batch mode. The way it is set up now, I have to click ok (o
enter from keyboard), each time.

When the form is called the tab focus and tab index are set to the O
command button. I need some line to say that it is clicked.

More on why I need this, this way....

I am tweaking a form created by someone before me to input certai
range of data. The form has a bunch of code that check for types o
data and prompts for user to select the range. Upon selecting the rang
and click 'OK', it formats the data, and sends some key information t
the calling sub. All this happens within the user form. I don't inten
to change the form, but I'm having the task to redo some work (abou
500 inputs). So if I can set my machine to do this on a batch mode
will save me some time.

Thanks
D

--
reachthepalac
-----------------------------------------------------------------------
reachthepalace's Profile: http://www.excelforum.com/member.php...fo&userid=3172
View this thread: http://www.excelforum.com/showthread.php?threadid=53323

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default User form OK command automate

Application.SendKeys "{ENTER}"

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"reachthepalace"
<reachthepalace.26cecy_1145166301.8707@excelforu m-nospam.com wrote in
message news:reachthepalace.26cecy_1145166301.8707@excelfo rum-nospam.com...

Is there some line I can include in a form that does the 'click' or
click OK for me. I have a form that processes some data, and since i
know the data well, I just want the forms to be processed (about 500 of
them) on a batch mode. The way it is set up now, I have to click ok (or
enter from keyboard), each time.

When the form is called the tab focus and tab index are set to the OK
command button. I need some line to say that it is clicked.

More on why I need this, this way....

I am tweaking a form created by someone before me to input certain
range of data. The form has a bunch of code that check for types of
data and prompts for user to select the range. Upon selecting the range
and click 'OK', it formats the data, and sends some key information to
the calling sub. All this happens within the user form. I don't intent
to change the form, but I'm having the task to redo some work (about
500 inputs). So if I can set my machine to do this on a batch mode,
will save me some time.

Thanks
DR


--
reachthepalace
------------------------------------------------------------------------
reachthepalace's Profile:

http://www.excelforum.com/member.php...o&userid=31729
View this thread: http://www.excelforum.com/showthread...hreadid=533236



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default User form OK command automate


Clarification - Where does this command Application.sendkeys("{Enter}"
go?
In the sub, where the form is called or in the form itself. I've
attached parts of the code here

Form is called:

'Display Store Data userform
Dim ufStoreData As frmStoreData
Set ufStoreData = New frmStoreData
__Application.SendKeys_(\"{ENTER}\")_
With ufStoreData
..DataType = TYPE_RTS
..FormatMe
..Show

'If cancel button selected end routine
'If mvSDContinue = False Then Exit Sub
If .lblCanceled = True Then
Unload ufStoreData
Set ufStoreData = Nothing
Exit Sub
End If
'If cancel button not chosen, continue
Dim strSourceRangeAddress As String
If .optAlways.Value = True Then
rIPLAN = 0
ElseIf .optNew.Value = True Then
rIPLAN = 1
Else
rIPLAN = 2
End If
If .optYes.Value = True Then
rLABEL = CLng(True)
Else
rLABEL = CLng(False)
End If
strSourceRangeAddress = .refData.Text
End With
Unload ufStoreData
Set ufStoreData = Nothing


--
reachthepalace
------------------------------------------------------------------------
reachthepalace's Profile: http://www.excelforum.com/member.php...o&userid=31729
View this thread: http://www.excelforum.com/showthread...hreadid=533236

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
User form Command Buttons jhyatt Excel Discussion (Misc queries) 3 September 25th 07 04:28 PM
User form and Command button Marilyn Excel Discussion (Misc queries) 3 May 9th 07 12:50 AM
Command Button on User form for Printing Anthony Slater Excel Discussion (Misc queries) 2 September 7th 05 02:01 PM
User Form Option & Command Buttons Information Hog[_2_] Excel Programming 1 August 19th 05 10:00 PM
VBA Question - Canceling a 'Save As' command from a user form Jake Marx[_3_] Excel Programming 2 May 6th 04 10:10 PM


All times are GMT +1. The time now is 02:53 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"