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: 249
Default Userform List boxes - editing - then option to save changes (or no

[Excel 2003]

I populate text boxes in userforms using the following type of code to
retrieve data from the worksheets:

Private Sub GetData_Click()

Dim ws As Worksheet
Set ws = Worksheets("Sheet 1")
Me.txt1.Value = ws.Range("A1").Value
Me.txt2.Value = ws.Range("B2").Value
Me.txt3.Value = ws.Range("C3").Text
End Sub

I can edit the text boxes and then send the edited information back to the
worksheets using:

Private Sub PutData_Click()
Dim ws As Worksheet
Set ws = Worksheets("Sheet 1")
ws.Range("A1").Value = Me.txt1.Value
ws.Range("B2").Value = Me.txt2.Value
ws.Range("C3").Value = Me.txt3.Value
End Sub

What I need is for additional code to check whether the retrieved data has
been changed by the user (in the form) and warn the user to update the
changes before they exit the form. A user may decide not to accept the
changes so I would need the original GetData information to be stored so that
it could be re-written over any unwanted changes.

Can anyone help with this?

Thank You, Roger

 
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
Userform on intranet: disble save option, allow open only sam Excel Programming 1 August 3rd 09 05:35 PM
Missing list and option boxes Lynda Stan Excel Discussion (Misc queries) 0 July 15th 06 01:37 AM
Editing color/msoGradiant of shapes, option button and text boxes MD Excel Programming 1 April 23rd 06 06:06 PM
A general question about editing current list via UserForm excelnut1954 Excel Programming 6 January 25th 06 07:26 PM
Option Buttons and List Boxes Sue[_6_] Excel Programming 2 November 9th 04 09:32 PM


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