VBA

Moderators: PavlinII
Number of threads: 1673
Number of posts: 3078

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Programming a user form Posted by runner77 on 26 Oct 2009 at 3:11 PM
Hi there,

I have a user for which i would like to have get information from a cell in another sheet. The below code does not seem to work. it loads but no information from the cell range?

Private Sub PPMB1()
UserForm1.Show
TextBox1 = Worksheets("Database").Range("A4")
TextBox2 = Worksheets("Database").Range("B4")
TextBox3 = Worksheets("Database").Range("S4")
End Sub

thanks
Runner77
Report
Re: Programming a user form Posted by jaime777 on 28 Oct 2010 at 1:29 PM
Hi,
You need to select the cell and then get the value.

Worksheets("Database").Range("A4").Select
TextBox1 = Worksheets("Database").Range("A4").Value


Hope this helps!
-Jaime
www.programmerssolutions.com



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.