LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Chart versus Work Sheet Code Failure

Hi All
I have a problem when I update a workbook where I have selected (using sheet
tab not in code) a Chart sheet as opposed to a Work sheet.

If I select a Worksheet and run a procedure that updates a number of other
Worksheets everything is fine. If I have a Chart Sheet selected, then I get
an error, even though the code makes no specfic reference to the Chart.
Examples of the code that throw an error follow (shPressure and ShControl
are both worksheets)

The first refers to a work sheet (not chart), but if a chart is selected I
get Run-time error 13 Type Mismatch, the second Run-time error 1004 Method
'Rows' of object '_global' failed.

shPressure.Rows("6:7").Copy Destination:=shPressure.Range("A" & xFirstRow)

xlrow = shControl.Cells(Rows.Count, "K").End(xlUp).Row


--
Cheers
Nigel




 
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
Check Activesheet for chart sheet or work sheet NSK Charts and Charting in Excel 1 July 17th 07 09:00 PM
vb code for renaming a work sheet with a cell reference John Britto Excel Discussion (Misc queries) 3 September 17th 06 07:12 PM
Memory failure : Getting Sum to work Drew Cutter New Users to Excel 5 April 25th 06 07:35 PM
R1C1 versus A1 in VB code Bill Sturdevant[_2_] Excel Programming 8 January 27th 05 03:03 PM
VB Code does not work when sheet or workbook is protected novicevbaer[_5_] Excel Programming 1 August 25th 04 11:34 PM


All times are GMT +1. The time now is 04:54 AM.

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

About Us

"It's about Microsoft Excel"