Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a form that I want to control the return value coming from a code and when I use: UserForm1.cargo.Value = AnswerCell.Offset(0, 2).Value , Im getting an error 91 Object Variable or With block var not set. Any thoughts? Thanks a lot in advance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Perhaps it should be
UserForm1.cargo.Value = Activecell.Offset(0, 2).Value -- --- HTH Bob __________________________________________ UK Cambridge XL Users Conference 29-30 Nov http://www.exceluserconference.com/UKEUC.html (there's no email, no snail mail, but somewhere should be gmail in my addy) "Lp12" wrote in message ... Hi, I have a form that I want to control the return value coming from a code and when I use: UserForm1.cargo.Value = AnswerCell.Offset(0, 2).Value , Im getting an error 91 Object Variable or With block var not set. Any thoughts? Thanks a lot in advance. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It is telling you that you have not set AnswerCell as an object variable so
it does not know how to treat it. You will needd to do: Set AnswerCell = Worksheets(?).Range(?) 'where you supply the ? info. "Lp12" wrote: Hi, I have a form that I want to control the return value coming from a code and when I use: UserForm1.cargo.Value = AnswerCell.Offset(0, 2).Value , Im getting an error 91 Object Variable or With block var not set. Any thoughts? Thanks a lot in advance. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tnx all.....
My bad :) "JLGWhiz" wrote: It is telling you that you have not set AnswerCell as an object variable so it does not know how to treat it. You will needd to do: Set AnswerCell = Worksheets(?).Range(?) 'where you supply the ? info. "Lp12" wrote: Hi, I have a form that I want to control the return value coming from a code and when I use: UserForm1.cargo.Value = AnswerCell.Offset(0, 2).Value , Im getting an error 91 Object Variable or With block var not set. Any thoughts? Thanks a lot in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compare Value in Cell 1 to a List, Return Value if Match otherwise Return Null | Excel Discussion (Misc queries) | |||
Class programming - how to return chartobject from a class? | Excel Programming | |||
LOOKUP and return the column heading for IF/THEN return for False | Excel Discussion (Misc queries) | |||
check if reference exists, then return its value or return 0 | Excel Worksheet Functions | |||
VBA Syntax for VLOOKUP to return array of return values | Excel Programming |