Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-15-2019, 12:12 AM
Zeichner Zeichner is offline VBA Project Bar Format Windows 10 VBA Project Bar Format Office 2016
Novice
VBA Project Bar Format
 
Join Date: Jul 2019
Posts: 1
Zeichner is on a distinguished road
Question VBA Project Bar Format

Hi everyone

I would like to access the collection processes in MS Project with VBA to format them.
Is this possible without the column "collection process" visible?
I only worked with:

SelectRange row: = i + 1, Column: = 2, RowRelative: = False

I refer to the column where the column is currently containing the information I need, but how can I access the control if I do not want the column visible?
My complete code is to color the bars based on specific values (task names).
Now I would like to additionally find all collections and change the bar type, but I do not want to see the "Summary" column in the program.
How can I access these values?



Code:
Sub BalkenFärben()

    Dim Inhalt, InhaltNeu, Trennzeichen, Trennzeichen2 As String
    Dim i, Werte As Integer
    Dim ArrDaten(0 To 10, 0 To 10) As Double
    Dim Sammelvorgang As Boolean
    
    
    Trennzeichen = "_"


    'Von - Bis Spalten
    For i = 0 To 40
    
        'definiere Zeile mit schleife
        SelectRange row:=i + 1, Column:=2, RowRelative:=False
        Inhalt = ActiveCell
        
        'If IsEmpty(ActiveCell.row) = True Then End
        'letzte zeile finden????
        
        'Wenn Zelle leer dann nächster schritt in Schleife
        If Inhalt = "" Then
        
        'Wenn Zelle nicht leer dann:
        Else
            Inhalt = Split(Inhalt, Trennzeichen)(0)
              
                ArrDaten(0, 0) = 111#: ArrDaten(0, 1) = 5855577
                ArrDaten(1, 0) = 112#: ArrDaten(1, 1) = 5855577
                ArrDaten(2, 0) = 113#: ArrDaten(2, 1) = 5855577
                ArrDaten(3, 0) = 114#: ArrDaten(3, 1) = 5855577
                ArrDaten(4, 0) = 114.1: ArrDaten(4, 1) = 5855577
                ArrDaten(5, 0) = 115#: ArrDaten(5, 1) = 5855577
                ArrDaten(6, 0) = 116#: ArrDaten(6, 1) = 5855577
                ArrDaten(7, 0) = 171#: ArrDaten(7, 1) = 9279917
                ArrDaten(8, 0) = 172#: ArrDaten(8, 1) = 8498133
                ArrDaten(9, 0) = 173#: ArrDaten(9, 1) = 8498133
                ArrDaten(10, 0) = 174#: ArrDaten(10, 1) = 8498133
                
    
                For Werte = 0 To 10
                    If ArrDaten(Werte, 0) = Inhalt Then
                    
                    
                        GanttBarFormatEx MiddleShape:=1, MiddlePattern:=1, MiddleColor:=ArrDaten(Werte, 1), StartColor:=ArrDaten(Werte, 1), EndColor:=ArrDaten(Werte, 1)
                        GanttBarFormat lefttext:="Anfang"
                        GanttBarFormat righttext:="Name"
                     
                    End If
                Next Werte
            End If
            
    Next i
    
End Sub
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS project - appointment tracking with conditional format cyan2 Project 0 03-14-2019 01:56 AM
How to modify the Gantt chart bar styles (label of values) in project center (WPA) (MS Project 2010) Cedahlia Project 0 04-21-2018 10:29 PM
Is it a bug or not ? Ms Project randomly changes project's tasks resources name when re-open file ? capsule Project 1 11-26-2017 06:45 AM
Project task numbering changed after linking item in subproject to m aster project rrs_2017 Project 0 09-06-2017 06:07 AM
Microsoft Project Server, Microsoft Project Online and Project Web App - Whats the difference? chocolateCupcakes Project 1 02-11-2017 12:25 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:44 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft