Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / November 2007

Tip: Looking for answers? Try searching our database.

using textbox for cell values

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gus Chuch - 25 Nov 2007 23:03 GMT
This is my first attempt at VB for excel. All I’m trying to do is write to a
cell using a form with a textbox and a command button.
I would think you would do it something like this but it’s not working.
Private Sub CommandButton1_Click()
Sheet1.Cells(A, 1) = TextBox1.Value
End Sub

Any help would be appreciated
Gus Chuchanis
RB Smissaert - 25 Nov 2007 23:18 GMT
What is A?

Try:
Sheet1.Cells(1, 1) = TextBox1.Value

RBS

> This is my first attempt at VB for excel. All I’m trying to do is write to
> a
[quoted text clipped - 6 lines]
> Any help would be appreciated
> Gus Chuchanis
OssieMac - 25 Nov 2007 23:22 GMT
Hi Gus,

When you use Cells the row/column reference is back to front to Range method
and if you use the alpha column reference then enclose it in double quotes:-

Sheet1.Cells(1, "A") = TextBox1.Value

Using numeric column reference:-
Sheet1.Cells(1, 1) = TextBox1.Value
Signature

Regards,

OssieMac

> This is my first attempt at VB for excel. All I’m trying to do is write to a
> cell using a form with a textbox and a command button.
[quoted text clipped - 5 lines]
> Any help would be appreciated
> Gus Chuchanis
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.