Sir Babydum GBE
07-24-2007, 02:52 AM
Hi
I thought this would be simple and I'm using code that looks like it should work - but it doesn't. I've decided to stop crying and ask for help.
I have an application open on one half of the screen, and Excel on the other half. The excel spreadsheet has a list of reference numbers which I copy and then paste into the other application for researching accounts.
What I want is that when I click the Excel window, it realises it's been activated, moves down one cell and copies the contents. That's it.
I recorded a macro and put it in
Private Sub Worksheet_Activate()
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.Copy
then
Private Sub Workbook_Activate()
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.Copy
then
Private Sub Workbook_SheetActivate(ByVal Sh As Object).
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.Copy
I click away from Excel which activates the other application. I click back on Excel and nothing happens.
Why I ask you, WHY????
Thanks
I thought this would be simple and I'm using code that looks like it should work - but it doesn't. I've decided to stop crying and ask for help.
I have an application open on one half of the screen, and Excel on the other half. The excel spreadsheet has a list of reference numbers which I copy and then paste into the other application for researching accounts.
What I want is that when I click the Excel window, it realises it's been activated, moves down one cell and copies the contents. That's it.
I recorded a macro and put it in
Private Sub Worksheet_Activate()
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.Copy
then
Private Sub Workbook_Activate()
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.Copy
then
Private Sub Workbook_SheetActivate(ByVal Sh As Object).
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.Copy
I click away from Excel which activates the other application. I click back on Excel and nothing happens.
Why I ask you, WHY????
Thanks