XL: ???? ???? ????? ????? ?? ??? Visual Basic ???????

???? ?????? ???? ??????
???? ID: 213447 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
??? ?? ??????? ???? | ??? ?? ??????? ????

?? ????? ??

??????

Microsoft Excel ???, ?? ????????? ????? ????? ?? ???????? ?? ??? ????? ?????? ?????? ???? ????? ??? ???? ???? ?? ???? ????? ???? ?? ?? ????????? ?????? ?? ?????? ?? ????????? ????????? ?? ??? ?? Microsoft Visual Basic ?? ????? ?? ????? ????? ?? ??? ???? ?????

???? ???????

Microsoft ???????????? ?????? ?? ?????? ????? ??, ???? illustration ?????? ?? ?? expressed ?? ???????, ????? ???? ?? ???, ??????? ?????? ?? ?????? ??/?? ???? ????? ???????? ?? ??? ????????? ????? ???? ????? ????? ?? ???? ????? ?? ?? ?? demonstrated ?? ??? ???????????? ???? ?? ????? ?? ???????????? ?? ???? ???? ?? ??? ????? ??? ??????? ?? ?????? ???? Microsoft ?????? ????????? ?? ????? ????????? ?? ???????????? ?? ?????? ??? ?????? ?? ???? ???, ????? ?? ?? ???????? ?? ???????? ??????????????? ?? ???? ??????? ?????????? ?? ??? ???????????? ???? ?? ??? ??????? ???? ???????
??? ?? ???????????? ????? ????? ??, ?? ?? ???? ?? ?? Microsoft ?????????? ??????? ?? Microsoft ??????? ???? ?? ?????? ????? ???? ??????? ?? ???, ????? Microsoft ??? ???? ?? ????:

Microsoft ??????? - ?????????? ????https://partner.Microsoft.com/global/30000104

Microsoft ??????? ????-HTTP://support.Microsoft.com/GP/advisoryservice

???? ??????? ?? ??? ?????? ??? ?? ?????? ???????? ?? ???? ??? ?? Microsoft ?? ?????? ???? ???? ?? ???? ???, ????? Microsoft ??? ???? ?? ????:HTTP://support.Microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS????? ?? ??? ????????? ?????? ?? ??? ??? Visual Basic ???? ????? ????? ?? ??? ????? ?? ???? ??? ?? Excel ???, ????? ????? ?? ???? ????:
  1. Excel ??????? ????..
  2. Visual Basic ?????? ??????? ???? ?? ??? ALT+F11 ?????..
  3. ????? ???????????? ???????? ??,???????.
  4. ???? ????, ?? Visual Basic ??????? ????? ??? ????? ??? ???????:
    Option Explicit
     
    Sub Gantt_Chart()
        'Define the variables.
        Dim rge As String
        Dim ValueAxisMinValue As Date
        Dim shtname As String
        Dim Title As String, aChart As Chart
        'Store the location of the data as a string.
        rge = Selection.Address()
        'Store the start date for the chart.
        ValueAxisMinValue = Selection.Cells(2, 2).Value
        'Ask user for the Chart title.
        Title = InputBox("Please enter the title")
        'Store the sheet name.
        shtname = ActiveSheet.Name
        'Turn off screen updating.
        Application.ScreenUpdating = False
        'Create a chart located on a chart sheet.
        Set aChart = Charts.Add
        With aChart
            .ChartWizard Source:=Sheets(shtname).Range(rge), _
            Gallery:=xlBar, Format:=3, PlotBy:=xlColumns, _
            CategoryLabels:=1, SeriesLabels:=1, HasLegend:=1, _
            Title:=Title, CategoryTitle:="", ValueTitle:="", _
            ExtraTitle:=""
            'Remove the legend.
            .Legend.Delete
            'Create and format the series.
            With .SeriesCollection(1)
                With .Border
                    .Weight = xlThin
                    .LineStyle = xlNone
                End With
                .InvertIfNegative = False
                .Interior.ColorIndex = xlNone
            End With
            'Modify the category (x) axis.
            With .Axes(xlCategory)
                .ReversePlotOrder = True
                .TickLabelSpacing = 1
                .TickMarkSpacing = 1
                .AxisBetweenCategories = True
            End With
            'Modify the value (y) axis.
            With .Axes(xlValue)
                .MinimumScale = ValueAxisMinValue
                .MaximumScaleIsAuto = True
                .MinorUnitIsAuto = True
                .MajorUnitIsAuto = True
                .Crosses = xlAutomatic
                .ReversePlotOrder = False
                .ScaleType = False
                .HasMajorGridlines = True
                .HasMinorGridlines = False
            End With
         End With
        'Turn screen updating back on.
        Application.ScreenUpdating = True
     
     End Sub
    					
  5. Excel ?? ???? ???? ?? ??? ALT+F11 ?????..

?????? ?? ????? ????

Gantt_chart ?????? ?? ????? ????, ????? ????? ?? ???? ????:
  1. ?? ??? Excel ?????????? ??? ????? ??? ???? ????:
         A1:            B1: START        C1: DAYS          D1: DAYS
         A2: TASK       B2: DATE         C2: COMPLETED     D2: REMAINING
         A3: TASK-1     B3: 1/1/91       C3: 150           D3: 15
         A4: TASK-2     B4: 5/1/91       C4: 21            D4: 31
         A5: TASK-3     B5: 7/1/91       C5: 0             D5: 114
         A6: TASK-4     B6: 10/1/91      C6: 0             D6: 4
         A7: TASK-5     B7: 10/15/91     C7: 0             D7: 31
         A8: TASK-6     B8: 11/1/91      C8: 0             D8: 2
    					
  2. ???? A2:D8 ?? ??? ?????
  3. ????? ????????????? ??,???????? ????-????? ????, ?? ???? ?????????.
  4. ????? ????,Gantt_chart?? ????-????? ????, ?? ???? ????????.
  5. ????? ?????? ????? ???? ????? ???? ????? ?? ???? ?? ????? ????? ?? ????????? ???? ???? ??? ?? ???? ?? ???????? ??????? ?? ?? ?? ????? ??? ???? ???? ????

???

???? ID: 213447 - ????? ???????: 20 ??????? 2011 - ??????: 3.0
???? ???? ???? ??:
  • Microsoft Excel 2000 Standard Edition
  • Microsoft Excel 2002 Standard Edition
  • Microsoft Excel 97 Standard Edition
??????: 
kbhowto kbmt KB213447 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:213447

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com