Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In trying to find that data recorded in this function I
am using TEST = so that I can see it's value in the locals window, as I step through the macro. However it errors out on <test = mycell.cell.Value2.Value2 (1).Value2(1, 1) with ( run-time 438 object doesn't support this property or method) I've also tried test = mycell.Value2.Value2(1).Value2(1, 1) Am I using the wrong variant assignment??? Sub merge1() Dim mycell As Variant Dim test As String Worksheets("Sheet1").Activate Set mycell = application.InputBox(prompt:="Select a cell", Type:=8) test = mycell.cell.Value2.Value2(1).Value2(1, 1) test = mycell.FormulaHidden End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
first try changing the Dim statement to Dim test As Variant -- Regards Frank Kabel Frankfurt, Germany Bob wrote: In trying to find that data recorded in this function I am using TEST = so that I can see it's value in the locals window, as I step through the macro. However it errors out on <test = mycell.cell.Value2.Value2 (1).Value2(1, 1) with ( run-time 438 object doesn't support this property or method) I've also tried test = mycell.Value2.Value2(1).Value2(1, 1) Am I using the wrong variant assignment??? Sub merge1() Dim mycell As Variant Dim test As String Worksheets("Sheet1").Activate Set mycell = application.InputBox(prompt:="Select a cell", Type:=8) test = mycell.cell.Value2.Value2(1).Value2(1, 1) test = mycell.FormulaHidden End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() test = mycell.cell.Value2.Value2(1).Value2(1, 1) should be test = mycell.Value2 -- Regards, Tom Ogilvy "Frank Kabel" wrote in message ... Hi first try changing the Dim statement to Dim test As Variant -- Regards Frank Kabel Frankfurt, Germany Bob wrote: In trying to find that data recorded in this function I am using TEST = so that I can see it's value in the locals window, as I step through the macro. However it errors out on <test = mycell.cell.Value2.Value2 (1).Value2(1, 1) with ( run-time 438 object doesn't support this property or method) I've also tried test = mycell.Value2.Value2(1).Value2(1, 1) Am I using the wrong variant assignment??? Sub merge1() Dim mycell As Variant Dim test As String Worksheets("Sheet1").Activate Set mycell = application.InputBox(prompt:="Select a cell", Type:=8) test = mycell.cell.Value2.Value2(1).Value2(1, 1) test = mycell.FormulaHidden End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks... This is what I have now and
it goes through with out error ======================= Sub merge2() Dim mycell As Variant Dim t2 As Variant Worksheets("Sheet1").Activate Set mycell = Application.InputBox(prompt:="Select a cell", Type:=8) t2 = mycell.Value2 Call MsgBox(mycell.Value2, vbOKOnly + vbExclamation + vbSystemModal + vbDefaultButton1, "Display Variable") End Sub ===================== I can see values (in the locals window) assigned to t2(n,n) where n is an array value, Can you tell me now how to capture those values one at a time to be concatenated into one cell??? "Tom Ogilvy" wrote in message ... test = mycell.cell.Value2.Value2(1).Value2(1, 1) should be test = mycell.Value2 -- Regards, Tom Ogilvy "Frank Kabel" wrote in message ... Hi first try changing the Dim statement to Dim test As Variant -- Regards Frank Kabel Frankfurt, Germany Bob wrote: In trying to find that data recorded in this function I am using TEST = so that I can see it's value in the locals window, as I step through the macro. However it errors out on <test = mycell.cell.Value2.Value2 (1).Value2(1, 1) with ( run-time 438 object doesn't support this property or method) I've also tried test = mycell.Value2.Value2(1).Value2(1, 1) Am I using the wrong variant assignment??? Sub merge1() Dim mycell As Variant Dim test As String Worksheets("Sheet1").Activate Set mycell = application.InputBox(prompt:="Select a cell", Type:=8) test = mycell.cell.Value2.Value2(1).Value2(1, 1) test = mycell.FormulaHidden End Sub |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub merge2()
Dim mycell As Variant Dim t2 As Variant, sStr as Variant Worksheets("Sheet1").Activate Set mycell = Application.InputBox(prompt:= _ "Select a cell", Type:=8) t2 = mycell.Value2 for i = lbound(t2,1) to ubound(t2,1) for j = lbound(t2,2) to ubound(t2,2) sStr = sStr & t2(i,j) & ", " Next j sStr = Left(sStr, len(sStr)-2) & vbNewLine Next i Call MsgBox(sStr, vbOKOnly + _ vbExclamation + vbSystemModal + _ vbDefaultButton1, "Display Variable") End Sub -- Regards, Tom Ogilvy "Bob" wrote in message ... Thanks... This is what I have now and it goes through with out error ======================= Sub merge2() Dim mycell As Variant Dim t2 As Variant Worksheets("Sheet1").Activate Set mycell = Application.InputBox(prompt:="Select a cell", Type:=8) t2 = mycell.Value2 Call MsgBox(mycell.Value2, vbOKOnly + vbExclamation + vbSystemModal + vbDefaultButton1, "Display Variable") End Sub ===================== I can see values (in the locals window) assigned to t2(n,n) where n is an array value, Can you tell me now how to capture those values one at a time to be concatenated into one cell??? "Tom Ogilvy" wrote in message ... test = mycell.cell.Value2.Value2(1).Value2(1, 1) should be test = mycell.Value2 -- Regards, Tom Ogilvy "Frank Kabel" wrote in message ... Hi first try changing the Dim statement to Dim test As Variant -- Regards Frank Kabel Frankfurt, Germany Bob wrote: In trying to find that data recorded in this function I am using TEST = so that I can see it's value in the locals window, as I step through the macro. However it errors out on <test = mycell.cell.Value2.Value2 (1).Value2(1, 1) with ( run-time 438 object doesn't support this property or method) I've also tried test = mycell.Value2.Value2(1).Value2(1, 1) Am I using the wrong variant assignment??? Sub merge1() Dim mycell As Variant Dim test As String Worksheets("Sheet1").Activate Set mycell = application.InputBox(prompt:="Select a cell", Type:=8) test = mycell.cell.Value2.Value2(1).Value2(1, 1) test = mycell.FormulaHidden End Sub |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, very Much Tom, I've just learned a great deal
about arrays Lbound and Ubound.... So much more to learn.. This works great, I did need to add DIM i, j as Variant Am I wrong in assuming that Variant is a most general and useful category, unless you need to do something specific with a variable like calculations ...?? Thank you, and all the others again for all your time and assistance.. -----Original Message----- Sub merge2() Dim mycell As Variant Dim t2 As Variant, sStr as Variant Worksheets("Sheet1").Activate Set mycell = Application.InputBox(prompt:= _ "Select a cell", Type:=8) t2 = mycell.Value2 for i = lbound(t2,1) to ubound(t2,1) for j = lbound(t2,2) to ubound(t2,2) sStr = sStr & t2(i,j) & ", " Next j sStr = Left(sStr, len(sStr)-2) & vbNewLine Next i Call MsgBox(sStr, vbOKOnly + _ vbExclamation + vbSystemModal + _ vbDefaultButton1, "Display Variable") End Sub -- Regards, Tom Ogilvy "Bob" wrote in message .. . Thanks... This is what I have now and it goes through with out error ======================= Sub merge2() Dim mycell As Variant Dim t2 As Variant Worksheets("Sheet1").Activate Set mycell = Application.InputBox(prompt:="Select a cell", Type:=8) t2 = mycell.Value2 Call MsgBox(mycell.Value2, vbOKOnly + vbExclamation + vbSystemModal + vbDefaultButton1, "Display Variable") End Sub ===================== I can see values (in the locals window) assigned to t2(n,n) where n is an array value, Can you tell me now how to capture those values one at a time to be concatenated into one cell??? "Tom Ogilvy" wrote in message ... test = mycell.cell.Value2.Value2(1).Value2(1, 1) should be test = mycell.Value2 -- Regards, Tom Ogilvy "Frank Kabel" wrote in message ... Hi first try changing the Dim statement to Dim test As Variant -- Regards Frank Kabel Frankfurt, Germany Bob wrote: In trying to find that data recorded in this function I am using TEST = so that I can see it's value in the locals window, as I step through the macro. However it errors out on <test = mycell.cell.Value2.Value2 (1).Value2(1, 1) with ( run-time 438 object doesn't support this property or method) I've also tried test = mycell.Value2.Value2(1).Value2(1, 1) Am I using the wrong variant assignment??? Sub merge1() Dim mycell As Variant Dim test As String Worksheets("Sheet1").Activate Set mycell = application.InputBox(prompt:="Select a cell", Type:=8) test = mycell.cell.Value2.Value2(1).Value2(1, 1) test = mycell.FormulaHidden End Sub . |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OK I Thought I would be able to figure this out, but I was
WRONG... How do I allow the selection of the cell where this can be pasted into??? Have been trying to use INPUTBOX, but I can not find where the cell reference is stored in that function.... ??? -----Original Message----- Thanks, very Much Tom, I've just learned a great deal about arrays Lbound and Ubound.... So much more to learn.. This works great, I did need to add DIM i, j as Variant Am I wrong in assuming that Variant is a most general and useful category, unless you need to do something specific with a variable like calculations ...?? Thank you, and all the others again for all your time and assistance.. -----Original Message----- Sub merge2() Dim mycell As Variant Dim t2 As Variant, sStr as Variant Worksheets("Sheet1").Activate Set mycell = Application.InputBox(prompt:= _ "Select a cell", Type:=8) t2 = mycell.Value2 for i = lbound(t2,1) to ubound(t2,1) for j = lbound(t2,2) to ubound(t2,2) sStr = sStr & t2(i,j) & ", " Next j sStr = Left(sStr, len(sStr)-2) & vbNewLine Next i Call MsgBox(sStr, vbOKOnly + _ vbExclamation + vbSystemModal + _ vbDefaultButton1, "Display Variable") End Sub -- Regards, Tom Ogilvy "Bob" wrote in message . .. Thanks... This is what I have now and it goes through with out error ======================= Sub merge2() Dim mycell As Variant Dim t2 As Variant Worksheets("Sheet1").Activate Set mycell = Application.InputBox(prompt:="Select a cell", Type:=8) t2 = mycell.Value2 Call MsgBox(mycell.Value2, vbOKOnly + vbExclamation + vbSystemModal + vbDefaultButton1, "Display Variable") End Sub ===================== I can see values (in the locals window) assigned to t2(n,n) where n is an array value, Can you tell me now how to capture those values one at a time to be concatenated into one cell??? "Tom Ogilvy" wrote in message ... test = mycell.cell.Value2.Value2(1).Value2(1, 1) should be test = mycell.Value2 -- Regards, Tom Ogilvy "Frank Kabel" wrote in message ... Hi first try changing the Dim statement to Dim test As Variant -- Regards Frank Kabel Frankfurt, Germany Bob wrote: In trying to find that data recorded in this function I am using TEST = so that I can see it's value in the locals window, as I step through the macro. However it errors out on <test = mycell.cell.Value2.Value2 (1).Value2(1, 1) with ( run-time 438 object doesn't support this property or method) I've also tried test = mycell.Value2.Value2(1).Value2(1, 1) Am I using the wrong variant assignment??? Sub merge1() Dim mycell As Variant Dim test As String Worksheets("Sheet1").Activate Set mycell = application.InputBox(prompt:="Select a cell", Type:=8) test = mycell.cell.Value2.Value2(1).Value2(1, 1) test = mycell.FormulaHidden End Sub . . |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
a reference to the cell selected is held by mycell.
-- Regards, Tom Ogilvy "Bob" wrote in message ... OK I Thought I would be able to figure this out, but I was WRONG... How do I allow the selection of the cell where this can be pasted into??? Have been trying to use INPUTBOX, but I can not find where the cell reference is stored in that function.... ??? -----Original Message----- Thanks, very Much Tom, I've just learned a great deal about arrays Lbound and Ubound.... So much more to learn.. This works great, I did need to add DIM i, j as Variant Am I wrong in assuming that Variant is a most general and useful category, unless you need to do something specific with a variable like calculations ...?? Thank you, and all the others again for all your time and assistance.. -----Original Message----- Sub merge2() Dim mycell As Variant Dim t2 As Variant, sStr as Variant Worksheets("Sheet1").Activate Set mycell = Application.InputBox(prompt:= _ "Select a cell", Type:=8) t2 = mycell.Value2 for i = lbound(t2,1) to ubound(t2,1) for j = lbound(t2,2) to ubound(t2,2) sStr = sStr & t2(i,j) & ", " Next j sStr = Left(sStr, len(sStr)-2) & vbNewLine Next i Call MsgBox(sStr, vbOKOnly + _ vbExclamation + vbSystemModal + _ vbDefaultButton1, "Display Variable") End Sub -- Regards, Tom Ogilvy "Bob" wrote in message . .. Thanks... This is what I have now and it goes through with out error ======================= Sub merge2() Dim mycell As Variant Dim t2 As Variant Worksheets("Sheet1").Activate Set mycell = Application.InputBox(prompt:="Select a cell", Type:=8) t2 = mycell.Value2 Call MsgBox(mycell.Value2, vbOKOnly + vbExclamation + vbSystemModal + vbDefaultButton1, "Display Variable") End Sub ===================== I can see values (in the locals window) assigned to t2(n,n) where n is an array value, Can you tell me now how to capture those values one at a time to be concatenated into one cell??? "Tom Ogilvy" wrote in message ... test = mycell.cell.Value2.Value2(1).Value2(1, 1) should be test = mycell.Value2 -- Regards, Tom Ogilvy "Frank Kabel" wrote in message ... Hi first try changing the Dim statement to Dim test As Variant -- Regards Frank Kabel Frankfurt, Germany Bob wrote: In trying to find that data recorded in this function I am using TEST = so that I can see it's value in the locals window, as I step through the macro. However it errors out on <test = mycell.cell.Value2.Value2 (1).Value2(1, 1) with ( run-time 438 object doesn't support this property or method) I've also tried test = mycell.Value2.Value2(1).Value2(1, 1) Am I using the wrong variant assignment??? Sub merge1() Dim mycell As Variant Dim test As String Worksheets("Sheet1").Activate Set mycell = application.InputBox(prompt:="Select a cell", Type:=8) test = mycell.cell.Value2.Value2(1).Value2(1, 1) test = mycell.FormulaHidden End Sub . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
formating inputbox result in excel | Excel Worksheet Functions | |||
Excel Inputbox | Excel Discussion (Misc queries) | |||
Excel VBA - InputBox DEFAULT Value? | Excel Programming | |||
Excel VBA Inputbox Properties? | Excel Programming | |||
Excel Macro Code invoking InputBox. | Excel Programming |