How To put The textbox value in the cell of Excel 
Author Message
 How To put The textbox value in the cell of Excel

Hi..

I make a Form and using textbox for user to input value. But now I have
difficulty in copying the value into the cell of Excel. This Excel is a
report which generate data from somr textBox in that form

Anyone can tell me how to get it ?
I try using this but not working

Private Sub CommandButton1_Click()
    CustomerCalls.Hide
    asnoofcust = CustomerCalls.TextBox1.Text
End Sub

in The Main Menu

Dim asnoofcus As Integer

 Worksheets("Summary").Range("D13").Select
  ActiveCell = asnoofcus

Thanks in Advance

Regards,



Wed, 18 Jun 1902 08:00:00 GMT  
 How To put The textbox value in the cell of Excel
Tandi,

Private Sub CommandButton1_Click()
Worksheets("Summary").Range("D13") = TextBox1.Value
Unload Me
End Sub

HTH,
--
JM



Quote:
> Hi..

> I make a Form and using textbox for user to input value. But now I have
> difficulty in copying the value into the cell of Excel. This Excel is a
> report which generate data from somr textBox in that form

> Anyone can tell me how to get it ?
> I try using this but not working

> Private Sub CommandButton1_Click()
>     CustomerCalls.Hide
>     asnoofcust = CustomerCalls.TextBox1.Text
> End Sub

> in The Main Menu

> Dim asnoofcus As Integer

>  Worksheets("Summary").Range("D13").Select
>   ActiveCell = asnoofcus

> Thanks in Advance

> Regards,



Wed, 18 Jun 1902 08:00:00 GMT  
 How To put The textbox value in the cell of Excel
Hi Tandi,

I dit not try your code, but I can see you are using two different
names : asnoofcusT and asnoofcus

Quote:
>   asnoofcust = CustomerCalls.TextBox1.Text
>   ActiveCell = asnoofcus

Maybe you can use Option.Explicit in your declaration section to
prevent these faults.

Frederik



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Return currency value from textbox to an excel cell

2. Using copy past Special Only Value when user put value in other cell

3. VBA to put value in Cell x places from current cell

4. Put a calculated value of a cell into another cell

5. Put TextBox text into a Cell

6. Put textbox contents into worksheet cells

7. Summing values from a listbox and putting that sum in textbox

8. Put value in textbox that is not part of form's record source

9. Print PDF in Excel X, Search a specific value in cells/Replace value in other cells

10. Textbox values based on other textbox values


 
Powered by phpBB® Forum Software © phpBB Group