Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Newbie Needs Help

I have written an ODBC report that I have parameter which I want users to
suuply via a VBA form.

How do I get the value from the form text box to a specific cell on a
specific sheet? I know I need some code behind a command button to do this
but a starting point would be greatly appreciated - cheers

Tia
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default Newbie Needs Help

Hi Jonathan,


The code goes behind the click event of the button. Below assumes you've
also got a text box name "txtBox1" on the form:

Private Sub CommandButton1_Click()
Application.ActiveWorkbook.Worksheets("YourSheetNa me").Range("A2").Value
= Me.txtBox1.Value
End Sub

Best regards

John

"Jonathan" wrote in message
...
I have written an ODBC report that I have parameter which I want users to
suuply via a VBA form.

How do I get the value from the form text box to a specific cell on a
specific sheet? I know I need some code behind a command button to do
this
but a starting point would be greatly appreciated - cheers

Tia



Reply
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
[newbie] Jon Excel Discussion (Misc queries) 3 March 29th 09 10:10 AM
Real Newbie newbie question Dave New Users to Excel 0 January 10th 07 07:55 PM
Very very new newbie Thalia Took New Users to Excel 1 September 29th 05 04:13 AM
newbie madcat[_7_] Excel Programming 0 July 1st 04 07:27 AM
ADO newbie help please Mike NG Excel Programming 0 July 23rd 03 03:10 PM


All times are GMT +1. The time now is 11:45 PM.

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"