What Type does it want? (VBA question)
Solved/Closed
InsertNicknameHere
-
Dec 3, 2014 at 03:59 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Dec 11, 2014 at 11:13 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Dec 11, 2014 at 11:13 AM
Related:
- What Type does it want? (VBA question)
- How to type # in laptop - Guide
- Keyboard won't type - Guide
- Vba case like - Guide
- How to type e with accent - Guide
- How many type of whatsapp we have - Guide
2 responses
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Dec 8, 2014 at 11:46 AM
Dec 8, 2014 at 11:46 AM
Hi Mark,
It's unclear to me what you are trying to do.
I thought you wanted to use VBA to input a value into a cell which has drop down list on it.
So I created a drop down list with your sample data and then used VBA to put data in the drop down list cell. No errors popped up.
Am I understanding you correctly?
Best regards,
Trowa
It's unclear to me what you are trying to do.
I thought you wanted to use VBA to input a value into a cell which has drop down list on it.
So I created a drop down list with your sample data and then used VBA to put data in the drop down list cell. No errors popped up.
Am I understanding you correctly?
Best regards,
Trowa
OMG....Cells is Row, column I think, and I was doing column, row....I bet that is my problem.
Still fairly new to this, it baffles me that some methods want row, column and some want column, row. You'd think they could make up their mind....
If that's not it, then I don't know what we are doing differently from each other... I am back on QTP 11 if that matters.
Thanks,
Mark
Still fairly new to this, it baffles me that some methods want row, column and some want column, row. You'd think they could make up their mind....
If that's not it, then I don't know what we are doing differently from each other... I am back on QTP 11 if that matters.
Thanks,
Mark
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Dec 11, 2014 at 11:13 AM
Dec 11, 2014 at 11:13 AM
You are right ThatGuyAskingAQuestion, I have overlooked that.
Range works like:
Range("A1") or Range("A1:B10")
and Cells works like:
Cells(1,1) or Cells(1,"A")
With Range you can refer to both a range as well as a single cell, while Cells can only refer to a single cell.
With Range you can use predetermined row and with Cells you can use both predetermined row and column.
So Range could be:
Range("A" & LastRow)
And Cells could be:
Cells(1,LastColumn) or Cells(LastRow,LastColumn)
And then you have the ability to combine the two, which could be:
Range(Cells(1,"A"),Cells(LastRow,LastColumn))
I guess it comes down to "getting used to it".
Hopefully this clarifies a few things.
Best regards,
Trowa
Range works like:
Range("A1") or Range("A1:B10")
and Cells works like:
Cells(1,1) or Cells(1,"A")
With Range you can refer to both a range as well as a single cell, while Cells can only refer to a single cell.
With Range you can use predetermined row and with Cells you can use both predetermined row and column.
So Range could be:
Range("A" & LastRow)
And Cells could be:
Cells(1,LastColumn) or Cells(LastRow,LastColumn)
And then you have the ability to combine the two, which could be:
Range(Cells(1,"A"),Cells(LastRow,LastColumn))
I guess it comes down to "getting used to it".
Hopefully this clarifies a few things.
Best regards,
Trowa