PDA

View Full Version : Solved: Copying cells when switching to excel



Sir Babydum GBE
05-24-2005, 04:21 AM
Hi all,

I'm switching between Excel and internet explorer to copy info from the worksheet and pasting it (one by one) to a web based data-entry form. I want to put code in so that when I click on excel, it automatically moves the active cell one down and copies the info. I pasted some code in the "Workbook_activate" module, but switching back to excel doesn't seem to constitute activating the workbook. Any ideas?

(My code:)
Private Sub Workbook_Activate()

ActiveCell.Offset(1, 0).Range("A1").Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Selection.Copy

End Sub

Cheers

mvidas
05-24-2005, 04:58 AM
Hi Babydum,
Have you tried the _windowactivate event?Private Sub Workbook_WindowActivate(ByVal Wn As Window)
End Sub
Seems like it would be perfect for this.
Matt

Sir Babydum GBE
06-02-2005, 03:44 AM
Matt,

Sorry for taking so long getting back to you. That was great - dunno how I missed that.

Cheers