![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Apr 2002
Location: Indianapolis
Posts: 80
|
I'm very new to VBA and have struggled for two days with this problem. My users will paste data from an extract file into a blank worksheet. Ths size of the data will vary, but if data is brought in, it will populate at least a1:ai2. After the paste, I need a macro to run. I've attempted to use the worksheet_change in VBA, but have had no success in testing. I've gone through the archives and tried inserting codes that have been offered up for this type of issue. Does pasting in values not trigger a change event? I feel I'm missing something really simple here. Any suggestions would be greatly appreciated.
Lisa |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Pasting does trigger the WorkSheet_Change event. Would you care to post your code here? There may be some other problem.
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Apr 2002
Location: Indianapolis
Posts: 80
|
Mark -
Here's the code ... Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$a$1" Then Call Decide_Rows End If End Sub The sub Decide_Rows works if I call it manually from the sheet. Thanks for your help... I'm using J Walk's book and this board to teach myself VBA and it's very slow going! |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|