LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default SENDKEYS and brackets

Thanks!!
--
Gary''s Student - gsnu200813


"Jim Rech" wrote:

This is how you send a bracket:

Application.SendKeys "{{}"

--
Jim
"Gary''s Student" wrote in message
...
Your question is a poster child for why people don't like SendKeys.

Brackets and braces {}[]

are tough to "send"

For example:

Sub sendbrackets()
Dim s As String
s = Chr(65)
Cells(1, 1).Select
Application.SendKeys "{F2}"
Application.SendKeys s
Application.SendKeys "{ENTER}"
DoEvents
End Sub

will send an upper case A, but:

Sub sendbrackets()
Dim s As String
s = Chr(123)
Cells(1, 1).Select
Application.SendKeys "{F2}"
Application.SendKeys s
Application.SendKeys "{ENTER}"
DoEvents
End Sub

fails totallly!
--
Gary''s Student - gsnu200813


"Zakynthos" wrote:

I'm using sendkeys (yes, I know not always reliable...) to send data to a
program which admits brackets of any description in headings and names
and
when typed or copied from elsewhere and pasted into a data field will be
readily accepted.

However, when exactly the same data is sent via sendkeys all is exported
but
the brackets are removed.

Why is this? Can I do anything to overrise this and input them into a
data
field?

Many thanks.




 
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
when are [ ] brackets used cmat Excel Worksheet Functions 2 October 21st 08 10:35 PM
Array Brackets {} Steved Excel Worksheet Functions 2 June 14th 07 09:03 AM
help with brackets tombradshawuk Excel Discussion (Misc queries) 3 November 17th 06 10:19 PM
=D6-E6 there are brackets? JillM Charts and Charting in Excel 1 July 21st 06 08:03 PM
Array brackets 68magnolia71 Excel Worksheet Functions 1 April 22nd 05 03:44 AM


All times are GMT +1. The time now is 10:26 PM.

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"