Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Return a value 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Return a value 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Return a value 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Return a value 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare Value in Cell 1 to a List, Return Value if Match otherwise Return Null Ben Excel Discussion (Misc queries) 2 March 15th 07 01:02 AM
Class programming - how to return chartobject from a class? [email protected] Excel Programming 3 October 11th 06 12:07 PM
LOOKUP and return the column heading for IF/THEN return for False NN Excel Discussion (Misc queries) 1 October 6th 06 11:24 AM
check if reference exists, then return its value or return 0 doudou Excel Worksheet Functions 1 June 4th 05 09:17 PM
VBA Syntax for VLOOKUP to return array of return values Alan Beban[_3_] Excel Programming 7 August 5th 03 11:41 AM


All times are GMT +1. The time now is 08:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"