Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-02-2015, 11:32 AM
JohnWilson JohnWilson is offline Help with VBA userform Windows 7 64bit Help with VBA userform Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,914
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Although you haven't declared the variable (and you should) PowerPoint will assume it to be declared in the Private sub. Because it is private to this sub only it cannot be used elsewhere.

Declare it like this
'Outside iof the private sub
Dim UserID As String

Private Sub TextBox1_Change()
UserID = TextBox1.Text
End Sub



Private Sub ToggleButton1_Click()
MsgBox ("Thank you," & UserID)
End Sub
Reply With Quote
Reply

Tags
help please, userform, vba code



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with VBA userform Keep Userform on Top didjee PowerPoint 5 10-20-2014 02:22 PM
VBA Code in a UserForm module to delete a Command Button which opens the userform Simoninparis Word VBA 2 09-21-2014 03:50 AM
Help with VBA userform Is it possible to take an input from a UserForm in one document to a UserForm in a do BoringDavid Word VBA 5 05-09-2014 09:08 AM
Help with VBA userform Checkbox in Userform lukael Excel Programming 5 02-18-2014 05:20 AM
Userform Code not quite right - help please vbanovice Word VBA 1 09-29-2013 09:20 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:58 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft