Excel Macro to Create Gantt ChartLast reviewed: November 4, 1994Article ID: Q74598 |
The information in this article applies to:
NOTE: The following article is provided as information only. Because of legalities, this article should only be transmitted via FAX to customers, not read over the phone. When sending out this article, a disclaimer should be attached. SUMMARYYou can use Microsoft Excel to create a Gantt Chart showing task status for project planning and control. The macro listed below creates a basic Gantt Chart. Instructions on how to use the macro follow. Enter the following in a macro sheet:
A1: Gantt_Chart A2: A3: =ECHO(FALSE) A4: min=OFFSET(SELECTION(),1,1,1,1) A5: title_text=INPUT("Please Enter the Title for this Chart.",2) A6: =NEW(2,2) A7: =GALLERY.BAR(3,TRUE) A8: =SELECT("S1") A9: =PATTERNS(2,1,1,1,,2,1,3,2,FALSE,FALSE) A10: =SELECT("Axis 2") A11: =SCALE(1,1,1,TRUE,TRUE,FALSE) A12: =SELECT("Axis 1") A13: =SCALE(min,TRUE,TRUE,31,TRUE,FALSE,FALSE,FALSE) A14: =FORMAT.TEXT(,,2) A15: =FORMAT.FONT(0,1,FALSE,"Helv",8,FALSE,FALSE,FALSE,FALSE) A16: =GRIDLINES(FALSE,FALSE,TRUE,FALSE) A17: =ATTACH.TEXT(1) A18: =FORMAT.FONT(0,1,FALSE,"Helv",12,TRUE,FALSE,FALSE,FALSE) A19: =FORMULA("="""&title_text&"""") A20: =SEND.KEYS("{ESC}") A21: =RETURN() MORE INFORMATIONTo make this macro work properly in Microsoft Excel versions 2.x, modify the macro above with the following changes:
A6: =NEW(2) A8: =SELECT("S1P1") A20: =SELECT("") Steps to Use the Macro
REFERENCES"Microsoft Excel User's Guide, Book 1." Version 4.0, chapter 14. "Microsoft Excel User's Guide, Book 2." Version 4.0, chapter 7. "Microsoft Excel User's Guide." Version 3.0, chapters 13 and 19. "PC Magazine," Feb 26,1991, "Spreadsheets," page 410. Craig Stinson.
|
KBCategory: kbprg kbmacro
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |