View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bijl167[_5_] Bijl167[_5_] is offline
external usenet poster
 
Posts: 1
Default Reading Userforms


Hi,

I created a userform in VBA which is activated by a button in Excel. O
this userform are 3 textboxes and 1 dropdown list. I've created a macr
for the ok button. The purpose is use the input of the textboxes in th
macro behind the Ok button.

My problem is that the value of the textboxes seems to be empty afte
I've clicked the OK box.

ok what I did:

Private Sub CmdOK_Click()

Sheets("Rate-table format").Copy after:=Sheets("Homepage")

NewSheetName_AfterUpdate
ServiceList_AfterUpdate

If NewSheetName.Value = "" Then
ActiveSheet.Name = ServiceName
Else
ActiveSheet.Name = RateSheetName
End If

End Sub

with:
Private Sub NewSheetName_AfterUpdate()
Dim RateSheetName As String
RateSheetName = NewSheetName.Value
End Sub

Private Sub ServiceList_AfterUpdate()
Dim ServiceName As String
ServiceName = ServiceList.Value
End Sub


NewSheetName is the name of a textbox. ServiceList is the name of th
dropdown box


Can anyone tell me how I can use the input of the textboxes?

THANKS

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com