LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default store variables

I use the code below to put the values of the respective rng's in the
TextBoxes when the UserForm opens. What I am wondering is if there is anyway
to store those values so if the user clicks on the Cancel button the values
will be returned to there cells replacing any edits that might have taken
place.



Private Sub UserForm_Initialize()
Dim rng
Set rng = Cells(ActiveCell.Row, 1)

TextBox1.Text = rng(1, 4).Value 'ALI Time
TextBox2.Text = rng(1, 5).Value 'Vacation In Lue Of Holiday
TextBox3.Text = rng(1, 6).Value 'Floating Holiday
TextBox4.Text = rng(1, 7).Value 'Carry Over Hours
TextBox5.Text = rng(1, 8).Value 'Other Adjustments
TextBox6.Text = rng(1, 12).Value 'Comments

End Sub

 
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
Store variables in code just as you can w. constants? Available to read/edit? tskogstrom Excel Programming 3 October 29th 07 10:18 AM
Store values in variables based on count Microsmith Excel Programming 3 May 20th 07 02:44 PM
How to store variables of a single cell in a column? noyau Excel Programming 5 December 25th 06 01:21 PM
store inventory sheet(ex:sports equipment store) vardan Excel Worksheet Functions 1 October 11th 06 12:51 AM
Store variables between XLA sessions Timo Autiokari Excel Programming 2 January 16th 04 12:02 PM


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