Thread
:
concatenation question
View Single Post
#
9
Posted to microsoft.public.excel.misc
Don Guillett
external usenet poster
Posts: 10,124
concatenation question
I don't use many userforms but try this
Sub stringit()
'ms = "userform1. windowsmediaplayer1.controls.currentposition"
ms = "userform1. windowsmediaplayer" & Range("a1") &
".controls.currentposition"
MsgBox ms
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"teepee" wrote in message
...
Thanks Don
It reports a syntax error however
"Don Guillett" wrote in message
...
Try it this way
Sub test ()
dim value as long
value = userform1.windowsmediaplayer" & range ("a1") &
".controls.currentposition
'value = userform1.windowsmediaplayer1controls.currentposit ion
msgbox value
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"teepee" wrote in message
...
To test I have the following macro, where cell a1 contains the value 1
Sub test ()
dim value as long
value = userform1.windowsmediaplayer & range ("a1") &
.controls.currentposition
'value = userform1.windowsmediaplayer1controls.currentposit ion
msgbox value
end sub
when I hash out the third line and unhash the fourth it successfully
return the messagebox value zero.
Most grateful if anyone can tell me if (a) I'm wasting my time with this
approach or (b) the correct syntax
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett