Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Define the irownumber
Option Explicit
Dim iRowNumber As Integer Private Sub CommandButton1_Click() Call PutData Range("DataBase").Resize(Range("Database").Rows.Co unt + 1).Name = "DataBase" iRowNumber = Range("DataBase").Rows.Count Call GetData TextBox1.SetFocus End Sub Sub PutData() With UserForm2 Range("DataBase").Cells(iRowNumber, 5) = .TextBox1 End With End Sub Sub GetData() With UserForm1 .TextBox1 = Range("DataBase").Cells(iRowNumber, 5) End With End Sub Private Sub CommandButton2_Click() Unload UserForm2 End Sub Hello Altough i defined the irownumber as an integer and as the rows count when i ask to put the data into the cell(irownumber,5), debug. The irownumber sets equal to zero so it cannot find a cell (0,5). Can you pleaze help me to find out what's wrong Thanks in advance Regards Angeliki PS. I used the same code for something relevant and it worked. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Define a Value | Excel Worksheet Functions | |||
Define Name | Excel Worksheet Functions | |||
Define name | Excel Discussion (Misc queries) | |||
Name Define | Excel Discussion (Misc queries) | |||
Define name Q | Excel Discussion (Misc queries) |