ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SENDKEYS and brackets (https://www.excelbanter.com/excel-programming/419980-sendkeys-brackets.html)

Zakynthos

SENDKEYS and brackets
 
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.

Gary''s Student

SENDKEYS and brackets
 
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.


Rick Rothstein

SENDKEYS and brackets
 
I'm not sure what the difference is between your system and mine (I'm using
XL2003 fully updated), but I cannot get your first macro to print
anything... the cell activates, but nothing is entered into the cell.

--
Rick (MVP - Excel)


"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.



Gary''s Student

SENDKEYS and brackets
 
Are you using Vista??
--
Gary''s Student - gsnu200813


"Rick Rothstein" wrote:

I'm not sure what the difference is between your system and mine (I'm using
XL2003 fully updated), but I cannot get your first macro to print
anything... the cell activates, but nothing is entered into the cell.

--
Rick (MVP - Excel)


"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.




Rick Rothstein

SENDKEYS and brackets
 
Yes. I guess Vista is protecting me from myself by not allowing SendKeys?

--
Rick (MVP - Excel)


"Gary''s Student" wrote in message
...
Are you using Vista??
--
Gary''s Student - gsnu200813


"Rick Rothstein" wrote:

I'm not sure what the difference is between your system and mine (I'm
using
XL2003 fully updated), but I cannot get your first macro to print
anything... the cell activates, but nothing is entered into the cell.

--
Rick (MVP - Excel)


"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.





Gary''s Student

SENDKEYS and brackets
 
See:

http://groups.google.com/group/micro...t=0&scoring=d&

But I thought this problem had been fixed?
--
Gary''s Student - gsnu200813


"Rick Rothstein" wrote:

Yes. I guess Vista is protecting me from myself by not allowing SendKeys?

--
Rick (MVP - Excel)


"Gary''s Student" wrote in message
...
Are you using Vista??
--
Gary''s Student - gsnu200813


"Rick Rothstein" wrote:

I'm not sure what the difference is between your system and mine (I'm
using
XL2003 fully updated), but I cannot get your first macro to print
anything... the cell activates, but nothing is entered into the cell.

--
Rick (MVP - Excel)


"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.





Rick Rothstein

SENDKEYS and brackets
 
My Vista and my Office installations are completely update; so either they
didn't fix it yet, or they did fix it, but then broke it again with a newer
update.

--
Rick (MVP - Excel)


"Gary''s Student" wrote in message
...
See:

http://groups.google.com/group/micro...t=0&scoring=d&

But I thought this problem had been fixed?
--
Gary''s Student - gsnu200813


"Rick Rothstein" wrote:

Yes. I guess Vista is protecting me from myself by not allowing SendKeys?

--
Rick (MVP - Excel)


"Gary''s Student" wrote in
message
...
Are you using Vista??
--
Gary''s Student - gsnu200813


"Rick Rothstein" wrote:

I'm not sure what the difference is between your system and mine (I'm
using
XL2003 fully updated), but I cannot get your first macro to print
anything... the cell activates, but nothing is entered into the cell.

--
Rick (MVP - Excel)


"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.






Jim Rech[_2_]

SENDKEYS and brackets
 
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.




Gary''s Student

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.






All times are GMT +1. The time now is 02:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com