Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default UserForm with Cell Data

I have a CommandButton bringing up a UserForm. On that
form, I want to display the contents of three cells, and
then display the sum of the other three cells. How do I
do this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default UserForm with Cell Data

private Sub CommandButton1_click()
With userform1
.Textbox1.Value = Range("A1").Text
.Textbox2.Value = Range("A2").Text
.Textbox3.Value = Range("A3").Text
.Textbox3.Value = Application.Sum(Range("A1:A3"))
.Show
End With
end Sub

--
Regards,
Tom Ogilvy


Phil Hageman wrote in message
...
I have a CommandButton bringing up a UserForm. On that
form, I want to display the contents of three cells, and
then display the sum of the other three cells. How do I
do this?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Thank You

Thanks, Tom - works fine!
-----Original Message-----
private Sub CommandButton1_click()
With userform1
.Textbox1.Value = Range("A1").Text
.Textbox2.Value = Range("A2").Text
.Textbox3.Value = Range("A3").Text
.Textbox3.Value = Application.Sum(Range("A1:A3"))
.Show
End With
end Sub

--
Regards,
Tom Ogilvy


Phil Hageman wrote in message
...
I have a CommandButton bringing up a UserForm. On that
form, I want to display the contents of three cells, and
then display the sum of the other three cells. How do I
do this?



.

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
userform that add data in all w/sheets tkraju via OfficeKB.com Excel Discussion (Misc queries) 0 March 24th 06 04:29 AM
Userform data Cordobes Excel Discussion (Misc queries) 3 December 3rd 05 05:48 PM
Data Validation Cell - Move to UserForm thom hoyle Excel Worksheet Functions 0 April 28th 05 12:23 AM
Use a UserForm to preview data Soniya Excel Programming 1 September 29th 03 12:15 PM
Taking Data of cell from worksheet to a userform window Mete Kavruk - EXPARTIZ Excel Programming 2 September 5th 03 02:33 PM


All times are GMT +1. The time now is 05:29 PM.

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"