ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   enter into an excel cell... (https://www.excelbanter.com/excel-programming/273418-enter-into-excel-cell.html)

Mark[_14_]

enter into an excel cell...
 
hi

i'm trying to creat a simple routine, that works off a
toolbar button, all i want it to do is put an equals
sign '=' in the active cell and make it active so i can
use the number pad. i've got the equals thing worked out
activecell.value = "=", but the problem is trying to make
the cell active, so when i type in numbers, it doesn't
overwrite my equals sign

any help would be great

cheers

mark

Chip Pearson

enter into an excel cell...
 
Mark,

Use SendKeys. E.g.,


ActiveCell.Value = "="
SendKeys "{F2}"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Mark" wrote in message
...
hi

i'm trying to creat a simple routine, that works off a
toolbar button, all i want it to do is put an equals
sign '=' in the active cell and make it active so i can
use the number pad. i've got the equals thing worked out
activecell.value = "=", but the problem is trying to make
the cell active, so when i type in numbers, it doesn't
overwrite my equals sign

any help would be great

cheers

mark




Tom Ogilvy

enter into an excel cell...
 
Sub AAA()
Application.SendKeys "{f2}="
End Sub


Regards,
Tom Ogilvy



Mark wrote in message
...
hi

i'm trying to creat a simple routine, that works off a
toolbar button, all i want it to do is put an equals
sign '=' in the active cell and make it active so i can
use the number pad. i've got the equals thing worked out
activecell.value = "=", but the problem is trying to make
the cell active, so when i type in numbers, it doesn't
overwrite my equals sign

any help would be great

cheers

mark





All times are GMT +1. The time now is 09:52 AM.

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