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: 276
Default Use 1 userform for many sheets, Rather than 1 userform per sheet: How?

The below is the code that i am using to display and update values in cells:
X3 & X6 on a sheet.
I have the rows and columns hiden from view, but the user can see the
current and modify if need by by using the userform.
However rather than creating a userform for each person, how can i use the 1
userform to look at the SAME cells (X3 & X6) DEPENDING on what sheet the
userform was run from????

I though the simple:
ACTIVESHEET.SELECT would do it but it seems to only look to the same sheet.






Private Sub CommandButton1_Click()
activessheet.select
If Me.TextBox2.Value < "" Then
Range("X3").Value = Me.TextBox2.Value
End If
If Me.TextBox4.Value < "" Then
Range("X6").Value = Me.TextBox4.Value
End If
UserForm2.Hide
MsgBox "The amounts have been Renewed.", , "title...."
End Sub

Private Sub CommandButton2_Click()
UserForm2.Hide
End Sub

Private Sub Frame1_Click()

End Sub

Private Sub TextBox1_Change()
With Me.TextBox1
End With
End Sub

Private Sub TextBox2_Change()
End Sub

Private Sub TextBox3_Change()
End Sub

Private Sub TextBox4_Change()
End Sub

Private Sub UserForm_Initialize()
ActiveSheet.Select
With Me.TextBox1
.ControlSource = "X3"
End With
With Me.TextBox3
.ControlSource = "X6"
End With

End Sub



Regards


Corey....


 
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 to enter values and shown in same userform in list helmekki[_104_] Excel Programming 0 November 19th 05 03:23 PM
Looping procedure calls userform; how to exit loop (via userform button)? KR Excel Programming 6 July 27th 05 12:57 PM
Activating userform and filling it with data form row where userform is activate Marthijn Beusekom via OfficeKB.com[_2_] Excel Programming 3 May 6th 05 05:44 PM
Access from add_in userform to main template userform.... Ajit Excel Programming 1 November 18th 04 05:15 PM


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