LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Command button on forms

Thanks, i got the quit button to work, still need help on the enter button. I
have the form cells linked to my excel sheet, the forms enters into the same
spot each time. Currently as soon as you enter someting into the form, it
enters into the sheet. I want it to wait till the user hits enter, to enter
it, or quit to canel and not enter anything. Currently, when i quit, the data
is still entered, and the form just closes. any help will be appreciated.

Thanks

Erik

"Jon Peltier" wrote:

Have the Quit button just hide or unload the form in its event code:

Private Sub btnQuit_Click()
Unload Me
End Sub

but have the Enter button transfer the data:

Private Sub btnEnter_Click()
ActiveSheet.Range("A1").Value = Me.txtData.Value
Unload Me
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Erik (AP Inc.)" wrote in message
...
I have a Visual Basic Form in my Excel File and I want to have a Enter
Button
and a Quit Button on the form, so the info dosen't enter the speadsheet
till
I hit the button. and then i want the form to close. And I want the quit
button to close out without entering anything. Any suggestions?

Thanks




 
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
Component not correctly registered Error opening Forms in Excel melliott1963 Excel Discussion (Misc queries) 0 May 26th 06 12:40 PM
using forms in a shared workbook Dan23 Excel Worksheet Functions 3 August 9th 05 03:31 PM
Print out certain forms automatically Lost! Excel Discussion (Misc queries) 0 June 4th 05 08:49 PM
Forms that are modal in 97 are not modal in 2003 Old Car Excel Discussion (Misc queries) 1 April 27th 05 08:25 AM
how do I combine two forms with different size columns to make on. Morningside Excel Discussion (Misc queries) 3 April 17th 05 05:17 PM


All times are GMT +1. The time now is 02:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"