Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default macros on charts that use fixed filenames

Hi

one problem i have with some of my macros which perform operations on
charts is that they incorporate the name of the file in the code - if
colleagues create their own versions of these files with different names
the code needs altering but the macro cannot dynamically update i
assume?

is there way of instead of writing the filename in the code it can be
referred to as "This workbook" or something like this - i tried but cant
get the syntax right just by trial and error

enlightenment from those talented and gifted out there would be
appreciated please!

TIA

matt
see code example below
-------------------------------
ActiveSheet.Unprotect
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.SeriesCollection(2).Select
With Selection.Border
.ColorIndex = 3
.Weight = xlThick
.LineStyle = xlContinuous
End With
With Selection
.MarkerBackgroundColorIndex = xlNone
.MarkerForegroundColorIndex = xlNone
.MarkerStyle = xlNone
.Smooth = False
.MarkerSize = 3
.Shadow = False
End With
ActiveWindow.Visible = False
Windows("HAN04.xls").Activate
----------------------------------



matt

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default macros on charts that use fixed filenames


The syntax is ThisWorkbook

- Manges

--
mangesh_yada
-----------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047
View this thread: http://www.excelforum.com/showthread.php?threadid=31866

Reply
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
Charts: want to assign fixed color for each slice [email protected] Excel Discussion (Misc queries) 1 November 15th 05 07:49 PM
Charts: want to assign fixed color for each slice [email protected] Charts and Charting in Excel 1 November 15th 05 07:49 PM
Print Excel charts in Word 2003 with fixed size Phil Charts and Charting in Excel 1 November 3rd 05 04:24 AM
Linked excel charts, changing filenames generates exception Paul DeMarco Excel Programming 1 July 28th 04 03:02 AM
How not to fixed cell address in Macros Teak[_2_] Excel Programming 2 April 15th 04 05:08 AM


All times are GMT +1. The time now is 02:46 PM.

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"