Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
User form Command Buttons | Excel Discussion (Misc queries) | |||
User form and Command button | Excel Discussion (Misc queries) | |||
Command Button on User form for Printing | Excel Discussion (Misc queries) | |||
User Form Option & Command Buttons | Excel Programming | |||
VBA Question - Canceling a 'Save As' command from a user form | Excel Programming |