LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Worksheet Change Event Problem

Howdy,
I am looking at one cell defined as "output_period", and when it changes I
want to update the sheet with a range from another sheet. I have a couple of
questions;
1) the output_period is controlled by a Forms combo-box, and the macro does
not seem to fire based on that change. Is there another event I should
consider (preference would be not to use ActiveX).
2) normal cell editing does cause the macro to fire, however it hangs at the
"set getRange" line. Method 'Range' of object '_worksheet' failed. I have
used similar code in non-event type macros without a problem, and I am not
sure what is wrong.

Here is the code:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)

Dim getRange As Range
Dim outRange As Range
Dim k As Integer

k = Range("output_period")

If Not Intersect(Target, Me.Range("output_period")) Is Nothing Then
Set getRange = Range("Year1_inspMon").Offset(0, k - 1)
Set outRange = Range("out_inspect_loc")

getRange.Copy Destination:=outRange

End If

End Sub

TIA,
Tim
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Worksheet Change event LAF Excel Discussion (Misc queries) 3 January 4th 06 02:08 AM
Worksheet Change Event TonyM Excel Discussion (Misc queries) 8 March 11th 05 12:52 PM
Worksheet Row Change event crazybass2 Excel Discussion (Misc queries) 4 December 8th 04 05:29 PM
Change Cell from Validated List Not Firing Worksheet Change Event [email protected] Excel Programming 3 October 4th 04 03:00 AM
Worksheet Change Event Help Please J P Singh Excel Programming 1 July 16th 03 09:37 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"