Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
bob bob is offline
external usenet poster
 
Posts: 52
Default Excel VBA INPUTBOX() - Please Help

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Excel VBA INPUTBOX() - Please Help

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel VBA INPUTBOX() - Please Help


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA INPUTBOX() - Please Help

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel VBA INPUTBOX() - Please Help

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   Report Post  
Posted to microsoft.public.excel.programming
bob bob is offline
external usenet poster
 
Posts: 52
Default Excel VBA INPUTBOX() - Please Help

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   Report Post  
Posted to microsoft.public.excel.programming
bob bob is offline
external usenet poster
 
Posts: 52
Default Excel VBA INPUTBOX() - Please Help

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel VBA INPUTBOX() - Please Help

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
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
formating inputbox result in excel NoelH Excel Worksheet Functions 3 May 2nd 06 07:27 AM
Excel Inputbox Frank Excel Discussion (Misc queries) 1 May 19th 05 10:55 AM
Excel VBA - InputBox DEFAULT Value? BruceAtkinson[_3_] Excel Programming 3 May 26th 04 08:18 PM
Excel VBA Inputbox Properties? BruceAtkinson Excel Programming 2 May 25th 04 07:49 PM
Excel Macro Code invoking InputBox. Andrew Thorne Excel Programming 0 July 30th 03 10:23 PM


All times are GMT +1. The time now is 12:30 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"