Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
User form problem
Dear all,
I follow a book's example which teaches how to transfer the data (Name & Sex) from an user form onto a spreadsheet. I follow the procedures step-by-step but when I clicked the "OK" button which executives the transfer action, a compile error occurred stating "variables not defined" and highlighted the wording "NextRow =" in the VBA code below. Please kindly advise what's wrong with the code and how to remedy it. Thanks. Sheets("Sheet1").Activate NextRow = _ Application.WorksheetFunction.CountA(Range("A:A")) + 1 Cells(NextRow, 1) = TextName.Text If OptionMale Then Cells(NextRow, 2) = "Male" If OptionFemale Then Cells(NextRow, 2) = "Female" If OptionUnknown Then Cells(NextRow, 2) = "Unknown" TextName.Text = "" OptionUnknown = True TextName.Text.SetFocus |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
User Form: Consecutive numbering | Excel Worksheet Functions | |||
Filter Excel Pivot, based on user entry form | Excel Discussion (Misc queries) | |||
Baffling! Spreadsheet Data Form Size | Excel Discussion (Misc queries) | |||
user form question: text box to display result | Excel Worksheet Functions | |||
User Form in VB = TextBox | Excel Discussion (Misc queries) |