Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
using textbox for cell values
This is my first attempt at VB for excel. All Im 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 its not working. Private Sub CommandButton1_Click() Sheet1.Cells(A, 1) = TextBox1.Value End Sub Any help would be appreciated Gus Chuchanis |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
using textbox for cell values
What is A?
Try: Sheet1.Cells(1, 1) = TextBox1.Value RBS "Gus Chuch" wrote in message ... This is my first attempt at VB for excel. All Im 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 its not working. Private Sub CommandButton1_Click() Sheet1.Cells(A, 1) = TextBox1.Value End Sub Any help would be appreciated Gus Chuchanis |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
using textbox for cell values
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 -- Regards, OssieMac "Gus Chuch" wrote: This is my first attempt at VB for excel. All Im 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 its not working. Private Sub CommandButton1_Click() Sheet1.Cells(A, 1) = TextBox1.Value End Sub Any help would be appreciated Gus Chuchanis |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pasting values from a textbox into a single cell on a spreadsheet | Excel Programming | |||
VBA- inserting multiple cell values into single textbox | Excel Programming | |||
How do I add TextBox.values? | Excel Programming | |||
How do I add TextBox.values? | Excel Discussion (Misc queries) | |||
How do I add TextBox.values? | Excel Worksheet Functions |