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: 1
Default VBA: Update worksheet when txtBox data changes.


IM TRYING TO CHANGE A WORKSHEETS CELL VALUE WHEN AN END-USER CHANGES TH
VALUE OF A TXTBOX ON A CUSTOMIZED FORM

Essentially Im pulling information from an excel file and some of tha
information may need to be changed by the end-user.

how to I submit any changes back to the spreadsheet once a end-use
changes a field?

Here is the code for the lookup feature to give you an idea of what I
working with.
================================================== =
Dim rng As Range

With Worksheets(1)
Set rng = .Columns(6).Find(txtCustSSN.Text)

If Not rng Is Nothing Then
'Populate frmCustLookup with Customer Information
txtLname.text = .Cells(rng.Row, 3).Value
txtFname.text = .Cells(rng.Row, 4).Value
txtMname.text = .Cells(rng.Row, 5).Value

Else: MsgBox "Customer Data Not Found"

End If

End With

End Sub
================================================== ===

So for example we look up Ms. Smiths record (by SSN), and need t
change her last name since she has recently been married.

_when_the_user_types:_Andersen_over_top_of_Smith_h ow_do_I_send_that_update_back_to_the_worksheet?_

I'VE CREATED A COMMAND BUTTON \"CMDUPDATERECORD\" TO SUBMIT TH
CHANGES, BUT IM NOT SURE WHAT CODE TO USE


Thank you for your advice, I know the solution should be easy, but m
coding is a little rusty

--
Mcastee
-----------------------------------------------------------------------
Mcasteel's Profile: http://www.excelforum.com/member.php...fo&userid=1569
View this thread: http://www.excelforum.com/showthread.php?threadid=27423

 
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
How do I update worksheet 1 from data on worksheet 2 JR Excel Worksheet Functions 2 May 10th 07 01:34 PM
VBA: Update worksheet when txtBox data changes. Mcasteel Excel Worksheet Functions 2 November 14th 04 11:59 PM
VBA: Update worksheet when txtBox data changes. Mcasteel Excel Worksheet Functions 1 November 13th 04 03:19 PM
VBA: Update worksheet when txtBox data changes. Mcasteel Excel Worksheet Functions 1 November 1st 04 06:18 PM
VBA question - Inputing data to txtbox in userform using short date formart ajliaks[_2_] Excel Programming 2 April 13th 04 11:45 AM


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