![]() |
concatenation query
Hello
I'm guessing this isn't allowed but I'd welcome confirmation Can one concatenate a variable into a VBA command So for example instead of userform1. windowsmediaplayer1.controls.currentposition could you have userform1. windowsmediaplayer & ("range a1") & .controls.currentposition If so what would the correct syntax be? Many thanks |
concatenation query
In WHICH group do you want an answer?
-- Don Guillett Microsoft MVP Excel SalesAid Software "teepee" wrote in message ... Hello I'm guessing this isn't allowed but I'd welcome confirmation Can one concatenate a variable into a VBA command So for example instead of userform1. windowsmediaplayer1.controls.currentposition could you have userform1. windowsmediaplayer & ("range a1") & .controls.currentposition If so what would the correct syntax be? Many thanks |
concatenation query
Try something like this...
UserForm1.Controls("WindowsMediaPlayer" & Range("A1").Value).Controls.currentPosition Note: That should all be on one line but I expect newsreaders will wrap the text because of its length. -- Rick (MVP - Excel) "teepee" wrote in message ... Hello I'm guessing this isn't allowed but I'd welcome confirmation Can one concatenate a variable into a VBA command So for example instead of userform1. windowsmediaplayer1.controls.currentposition could you have userform1. windowsmediaplayer & ("range a1") & .controls.currentposition If so what would the correct syntax be? Many thanks |
concatenation query
"Rick Rothstein" wrote in message ... Try something like this... UserForm1.Controls("WindowsMediaPlayer" & Range("A1").Value).Controls.currentPosition Worked a treat. Many thanks Rick |
All times are GMT +1. The time now is 04:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com