Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default coding for changes....

i have a userform that shows at workbook open, and a shortcut key to reshow
it later if needed. the textboxes on the userform put names directly into
cells on the worksheet, then creates a filename and saves it. when i tab out
of a text box or click the command button, i need excel to check to see if
the corresponding cell is empty, and if not, is it different from the
textbox? if so, ask the user it he wants to keep the change.

i have this code in a macro module:

Sub TB3change()
If ThisWorkbook.Saved = True And UserForm1.Visible = True Then
With ThisWorkbook
If Worksheets("Page 1").Range("A3") < "" And UserForm1.TextBox3.Text <
"" Then
If UserForm1.TextBox3.Text = Worksheets("Page 1").Range("A3").Text
Then
Exit Sub
Else: UserForm1.TextBox3.SetFocus
If MsgBox("This entry has changed. Do You Want to keep this
change?", vbQuestion + vbYesNo, "Entry Exists") = vbYes Then
Worksheets("Page 1").Range("A3").Select
Application.Selection.Value = UserForm1.TextBox3.Text
Else: Exit Sub
End If
End If
End If
End With
End If
End Sub

any help would be greatly appreciated.
Reply
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
coding maisy1 Excel Discussion (Misc queries) 1 August 6th 06 08:58 PM
VBA coding nir020 Excel Programming 3 January 17th 06 01:04 PM
"=ROW()-1" type of coding doesn't appear in a filter / is there coding that does? StargateFan[_3_] Excel Programming 10 October 6th 05 01:18 PM
Implant macro coding into ASP coding Sam yong Excel Programming 5 September 15th 05 10:37 AM
Coding help fpd833 Excel Programming 2 November 12th 04 08:22 PM


All times are GMT +1. The time now is 11:30 AM.

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"