LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Coding a Save button............


I need a little help in coding a, "Save" button on a VBA form.

I have about 5 text boxes. The user enters data in each text box and,
as of right now, the data automatically gets saved as I am using the
_change event. (TextBox1_Change()) This stores the value of each text
box into a cell of my choosing on an Excel spreadsheet automatically.

From what I gather, it would be better, as a coder, to use the _Enter
event. (TextBox1_Enter.) This way, when the user fills out the
information in the text boxes, the information will NOT be loaded onto
an Excel spreadsheet automatically as they type. (Which is what it
does now by using the following code for each text box
)Private Sub TextBox1_Change()
Sheets("Sheet1").Range("A" & intRow.) = TextBox1.Value

Instead, I want it to only be stored to the spreadsheet once they hit
a, "Save" button.

My question is this - simply put, how do I code the save button so that
it stores all the information on all five text boxes?

Also, note that the value of each text box gets stored in the next
available (or empty) row in rows, "A", "b", "C", "D", and, "E."

So the first time a user fills out a form, the values will go into
cells, "A1", then in, "B1", then in, "C1", ect..........

The next time the user enters values in the text boxes (say if the form
is cleared or the program is ran again), the value will be stored in,
"A2", then in, "B2", then, "C2", ect....... (I think you get the
picture.)

When coding this, "Save" button, I want to make sure that if the user
happens to NOT fill out a text box (which is allowable) when filling
out a form that the next time they go to use the program and fill in
the form, all values of all five text boxes are saved in that row.

I have noticed that if the user DOES choose to fill in the text box
that they skipped last time, that the value goes to the previous
skpped instead of going to the CURRENT row. I hope I explained this
enough for someone to understand cause I'm LOST with the coding of
this.

Please Help?!?!




--
chadtastic
 
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
Save button-shortcut mhanley Excel Worksheet Functions 0 November 8th 06 03:13 PM
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() Paul Dennis Excel Discussion (Misc queries) 5 September 18th 06 05:34 PM
how to get disk icon on save button of save as dialog like 2000 RichT Excel Discussion (Misc queries) 2 March 9th 06 08:13 PM
save as isnt there neither is the save button pressable fernandzefruitcake Excel Discussion (Misc queries) 3 September 28th 05 04:15 PM
Can't save Excel using Save button, hainstol Excel Discussion (Misc queries) 1 May 3rd 05 02:39 PM


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