Can Sendkeys be used to send a selected no. of characters in a sin

Z

Zakynthos

Say this is the data I have contained in a single cell c1:

PT NR 25 M (14h-20h),Tu (8h-14h45),W (8h-14h45),Th (8h-14h45),F
(8h-14h45),Sa (8h-16h)

Could I configure a sendkeys statament to send say the first 11
characters/spaces, say (up as far as the first bracket for instance) ?

The reason is that I want to input the code:Application.SendKeys "{{}" to
send an open bracet to this cell followed by, say: 14h-20h, followed by a
sendkeys statement for a closed bracket?
 
M

Mike H

Hi,

I'm not sure what your using sendkeys for. To build the string you require
use this

mystring = "{" & Trim(Left(Range("C1").Value, 11)) & "}"

After that I'm not sure what you want to do with the string

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top