Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to set an object variable. I get an error message when I
try to do the following: Dim NumberofColumns As Variant Dim BMax As Integer Set NumberofColumns = Application.InputBox(prompt:="Enter Number of 2D Elements", Type:=1) If NumberofColumns Is Nothing Then MsgBox ("Operation Canceled") Exit Sub Else BMax = NumberofColumns End If When I enter data or click on CANCEL the error says Type Mismatch. Is this because Variant and Type:= 1 are not compatible? --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Runtime Error '91' Object variable or With block variable not set | Excel Discussion (Misc queries) | |||
Object Variable Not Set Error on Selection object | Excel Worksheet Functions | |||
Error 91 - Object variable with block variable not set | Excel Programming | |||
Problem Using an Object Variable in a Class Definition | Excel Programming | |||
Object Variable or With Block variable not set? | Excel Programming |