ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Simple assignment question (https://www.excelbanter.com/excel-programming/334682-simple-assignment-question.html)

L.White

Simple assignment question
 
I have a cell that is populated from a drop down list.
I want to place the value in the cell into a portion of memory and I cannot
remember how to correctly word it.

I have tried:
myTitle = Range("B3").Value
myTitle = B3
myTitle = Range("B3")
myTitle = Worksheets("Current").Range("B3").value
And all of the above combinations with Set in front.

What am I doing wrong? I know this is something simple and I should see it
but just am not seeing it.

LWhite



Nigel

Simple assignment question
 
If it is from a drop down list then you need to refer to the control
containing the value.

mytitle = combobox1.value

--
Cheers
Nigel



"L.White" wrote in message
...
I have a cell that is populated from a drop down list.
I want to place the value in the cell into a portion of memory and I

cannot
remember how to correctly word it.

I have tried:
myTitle = Range("B3").Value
myTitle = B3
myTitle = Range("B3")
myTitle = Worksheets("Current").Range("B3").value
And all of the above combinations with Set in front.

What am I doing wrong? I know this is something simple and I should see it
but just am not seeing it.

LWhite





L.White

Simple assignment question
 
Never mind. I found it. This should not be Long but should be String.

Sorry to bother everyone.
LWhite




All times are GMT +1. The time now is 10:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com