![]() |
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. |
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. |
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. |
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. |
All times are GMT +1. The time now is 01:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com