Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default 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


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
Concatenation help Naresh Excel Worksheet Functions 4 September 30th 09 12:50 AM
concatenation query teepee[_3_] New Users to Excel 3 November 4th 08 12:55 AM
Concatenation query Greshter Excel Discussion (Misc queries) 3 June 22nd 05 07:13 AM
Concatenation Help Henry Excel Worksheet Functions 4 December 15th 04 08:21 PM
Concatenation Jim Cone Excel Programming 0 October 31st 04 01:17 AM


All times are GMT +1. The time now is 05:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"