IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Macros et VBA Excel Discussion :

Calendrier dans une formulaire [XL-2016]


Sujet :

Macros et VBA Excel

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Homme Profil pro
    Administrateur systèmes et réseaux
    Inscrit en
    Septembre 2013
    Messages
    17
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Administrateur systèmes et réseaux
    Secteur : Conseil

    Informations forums :
    Inscription : Septembre 2013
    Messages : 17
    Par défaut Calendrier dans une formulaire
    Bonjour,

    Depuis mon passage en EXCEL 2016 (64bit), les formulaires (userforms) n'affiche plus les calendriers.

    Cela est assez gênant.

    En EXCEL 2013, j'avais rajouter le fichier MSCOMCT2.OCX qui me permettait d'avoir les calendriers, mais cette méthode ne fonctionne pas sous EXCEL 2016.

    Y a-t-il une autre méthode ?

    J'ai pas envie de refaire toute les macros de la société.

    Merci d'avance.

    Guillaume

  2. #2
    Expert confirmé
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mai 2013
    Messages
    3 609
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Canada

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Alimentation

    Informations forums :
    Inscription : Mai 2013
    Messages : 3 609
    Par défaut
    Bonjour,

    Tu n'auras pas vraiment le choix que de te faire ton propre calendrier ou d'en utiliser un déjà existant.
    Si tu fais une recherche sur le site je me rappelle que dysorthographie (rdurupt) en avait déjà mis un en ligne et possiblement Patrick Toulon (?)

    Toujours est-il que sous Office 64 bits, on ne trouve à peu près plus rien comme contrôle...
    C'est bien dommage, mais il faut faire avec...

  3. #3
    Inactif  

    Homme Profil pro
    Développeur .NET
    Inscrit en
    Janvier 2012
    Messages
    4 903
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 68
    Localisation : Canada

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : Finance

    Informations forums :
    Inscription : Janvier 2012
    Messages : 4 903
    Billets dans le blog
    36
    Par défaut
    Bonjour,

    Citation Envoyé par ggerphagnon Voir le message
    Bonjour,


    Y a-t-il une autre méthode ?

    J'ai pas envie de refaire toute les macros de la société.

    Merci d'avance.

    Guillaume
    À part que de retrouver les calendriers de Robert ou de Patrick, ou de retourner en 32 bits, en acheter dans le commerce ailleurs que chez Microsoft ou de faire de nouveaux ActiveX compatibles 64 bits avec VB.net ou VB6, il n'y a pas vraiment d'autres solutions.

  4. #4
    Expert confirmé
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mai 2013
    Messages
    3 609
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Canada

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Alimentation

    Informations forums :
    Inscription : Mai 2013
    Messages : 3 609
    Par défaut
    Clement, est-ce qu'on peut construire des activeX 64 bits à partir de VB6 ?
    Déjà, est-ce qu'on peut installer VB6 sur Win 64 bits ? Il me semble avoir essayé sans succès (?)

  5. #5
    Expert confirmé
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mai 2013
    Messages
    3 609
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Canada

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Alimentation

    Informations forums :
    Inscription : Mai 2013
    Messages : 3 609
    Par défaut
    Citation Envoyé par dysorthographie Voir le message
    non mais j'ai déjà fat des controle qui fonctionnent sur wn10 64.
    À partir de VB6 sur 32 bits, c'est bien ça ? ?

  6. #6
    Invité
    Invité(e)
    Par défaut
    Bonsoir,
    https://www.developpez.net/forums/d1...e/#post8029399

    Citation Envoyé par parmi Voir le message
    Clement, est-ce qu'on peut construire des activeX 64 bits à partir de VB6 ?
    Déjà, est-ce qu'on peut installer VB6 sur Win 64 bits ? Il me semble avoir essayé sans succès (?)
    non mais j'ai déjà fat des controle qui fonctionnent sur wn10 64.
    Dernière modification par AlainTech ; 25/03/2017 à 15h45. Motif: Fusion de 2 messages

  7. #7
    Invité
    Invité(e)
    Par défaut
    Bonjour,
    Oui exactement, voici un exemple de l'éditeur Html de Patrick T.
    https://mon-partage.fr/f/8E5mtRgr/

    En vb6 tu as accès au calendar de Microsoft, tu fais un contrôle passe plats!

    https://www.developpez.net/forums/d1...l/#post8938804

    VB n'étant plus maintenu depuis 2003, c'est une action délibéré de Microsoft de supprimer progressivement Vba!

    ÉDITE:
    voila le code d'un contrôle de Calendar personnalisé (OCX) typ passe plat! il utilise le contrôle Calendar de Microsoft ! à noter que pour éviter toutes incompatibilités, j'ai implémenté le code sur une machine virtuelle Windows Xp!

    https://mon-partage.fr/f/Mnw2PAmc/
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    Me.CalendarRD1.Value = Date + 10
    Nom : Sans titre.png
Affichages : 6815
Taille : 33,3 Ko Nom : Sans titre.png
Affichages : 6997
Taille : 36,4 Ko

    Code CalendarRD.OCX : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    Event AfterUpdate()Event BeforeUpdate(Cancel As Integer)
    Event Click()
    Event DblClick()
    Event KeyDown(KeyCode As Integer, Shift As Integer)
    Event KeyPress(KeyAscii As Integer)
    Event KeyUp(KeyCode As Integer, Shift As Integer)
    Event NewMonth()
    Event NewYear()
    Event Validate(Cancel As Boolean)
    Public Property Let value(value)
    Calendar1.value = value
    End Property
    Public Property Get value()
     value = Calendar1.value
    End Property
    Public Property Let BackColor(value)
    Calendar1.BackColor = value
    End Property
    Public Property Get BackColor()
    BackColor = Calendar1.BackColor
    End Property
    Public Property Let CausesValidation(value)
    Calendar1.CausesValidation = value
    End Property
    Public Property Get CausesValidation()
    CausesValidation = Calendar1.CausesValidation
    End Property
    Public Property Let Container(value)
    Calendar1.Container = value
    End Property
    Public Property Get Container()
    ContainerCalendar1.Container
    End Property
    Public Property Let DataBindings(Index, value)
    Calendar1.DataBindings(Index) = value
    End Property
    Public Property Get DataBindings(Index)
    DataBindings = Calendar1.DataBindings(Index)
    End Property
    Public Property Let DataChanged(value As Boolean)
    Calendar1.DataChanged = False
    End Property
    Public Property Get DataChanged() As Boolean
    DataChanged = Calendar1.DataChanged
    End Property
    Public Property Let DataField(value)
    Calendar1.DataField = value
    End Property
    Public Property Get DataField()
    DataField = Calendar1.DataField
    End Property
    Public Property Let DataFormat(value)
     Calendar1.DataFormat = value
    End Property
     
     
    Public Property Let DataMember(value)
    Calendar1.DataMember = value
    End Property
    Public Property Get DataMember()
    DataMember = Calendar1.DataMember
    End Property
    Public Property Let DataSource(value)
    Set Calendar1.DataSource = value
    End Property
     
     
    Public Function Day()
    Day = Calendar1.Day
    End Function
    Public Property Let DayFont(value)
    Calendar1.DayFont = value
    End Property
    Public Property Get DayFont()
    DayFont = Calendar1.DayFont
    End Property
    Public Property Let DayFontColor(value)
    Calendar1.DayFontColor = value
    End Property
    Public Property Get DayFontColor()
    DayFontColor = Calendar1.DayFontColor
    End Property
    Public Property Let DayLength(value)
    Calendar1.DayLength = value
    End Property
    Public Property Get DayLength()
    DayLength = Calendar1.DayLength
    End Property
    Public Property Let FirstDay(vaue)
    Calendar1.FirstDay = value
    End Property
    Public Property Get FirstDay()
    FirstDay = Calendar1.FirstDay
    End Property
    Public Property Let GridCellEffect(vaue)
    Calendar1.GridCellEffect = value
    End Property
    Public Property Get GridCellEffect()
    GridCellEffect = Calendar1.GridCellEffect
    End Property
    Public Property Let GridFont(value)
    Calendar1.GridFont = value
    End Property
    Public Property Get GridFont()
    GridFont = Calendar1.GridFont
    End Property
    Public Property Let GridFontColor(value)
    Calendar1.GridFontColor = value
    End Property
    Public Property Get GridFontColor()
    GridFontColor = Calendar1.GridFontColor
    End Property
    Public Property Let GridLinesColor(value)
    Calendar1.GridLinesColor = value
    End Property
    Public Property Get GridLinesColor()
    GridLinesColor = Calendar1.GridLinesColor
    End Property
    Public Property Let Month(value)
    Calendar1.Month = value
    End Property
    Public Property Get Month()
    Month = Calendar1.Month
    End Property
    Public Property Let MonthLength(value)
    Calendar1.MonthLength = value
    End Property
    Public Property Get MonthLength()
    MonthLength = Calendar1.MonthLength
    End Property
    Public Sub NextDay()
     Calendar1.NextDay
    End Sub
    Public Sub NextMonth()
    Calendar1.NextMonth
    End Sub
    Public Sub NextWeek()
    Calendar1.NextWeek
    End Sub
    Public Sub NextYear()
     Calendar1.NextYear
    End Sub
    Public Sub PreviousDay()
    Calendar1.PreviousDay
    End Sub
    Public Sub PreviousMonth()
     Calendar1.PreviousMonth
    End Sub
    Public Sub PreviousWeek()
    Calendar1.PreviousWeek
    End Sub
    Public Sub PreviousYear()
    Calendar1.PreviousYear
    End Sub
    Public Sub Refresh()
    Calendar1.Refresh
    End Sub
     
     
    Public Property Let ShowDateSelectors(value As Boolean)
     Calendar1.ShowDateSelectors = value
    End Property
    Public Property Get ShowDateSelectors() As Boolean
    ShowDateSelectors = Calendar1.ShowDateSelectors
    End Property
    Public Property Let ShowDays(value As Boolean)
     Calendar1.ShowDays = value
    End Property
    Public Property Get ShowDays() As Boolean
     Calendar1.ShowDays = Calendar1.ShowDays
    End Property
    Public Property Let ShowHorizontalGrid(value As Boolean)
     Calendar1.ShowHorizontalGrid = value
    End Property
    Public Property Get ShowHorizontalGrid() As Boolean
     Calendar1.ShowHorizontalGrid = Calendar1.ShowHorizontalGrid
    End Property
    Public Property Let ShowTitle(value As Boolean)
     Calendar1.ShowTitle = value
    End Property
    Public Property Get ShowTitle() As Boolean
     ShowTitle = Calendar1.ShowTitle
    End Property
    Public Property Let ShowVerticalGrid(value As Boolean)
     Calendar1.ShowVerticalGrid = value
    End Property
    Public Property Get ShowVerticalGrid() As Boolean
     Calendar1.ShowVerticalGrid = Calendar1.ShowVerticalGrid
    End Property
    Public Property Let TitleFont(value)
    Calendar1.TitleFont = value
    End Property
    Public Property Get TitleFont()
    TitleFont = Calendar1.TitleFont
    End Property
    Public Property Let TitleFontColor(value)
      Calendar1.TitleFontColor = value
    End Property
    Public Property Get TitleFontColor()
      Calendar1.TitleFontColor = Calendar1.TitleFontColor
    End Property
    Public Sub Today()
      Calendar1.Today
    End Sub
    Public Function Year()
    Year = Calendar1.Year
    End Function
     
     
    Private Sub Calendar1_AfterUpdate()
    RaiseEvent AfterUpdate
    End Sub
    Private Sub Calendar1_BeforeUpdate(Cancel As Integer)
    RaiseEvent BeforeUpdate(Cancel)
    End Sub
    Private Sub Calendar1_Click()
    RaiseEvent Click
    End Sub
    Private Sub Calendar1_DblClick()
    RaiseEvent DblClick
    End Sub
    Private Sub Calendar1_KeyDown(KeyCode As Integer, Shift As Integer)
    RaiseEvent KeyDown(KeyCode, Shift)
    End Sub
    Private Sub Calendar1_KeyPress(KeyAscii As Integer)
    RaiseEvent KeyPress(KeyAscii)
    End Sub
    Private Sub Calendar1_KeyUp(KeyCode As Integer, Shift As Integer)
    RaiseEvent KeyUp(KeyCode, Shift)
    End Sub
    Private Sub Calendar1_NewMonth()
     RaiseEvent NewMonth
    End Sub
    Private Sub Calendar1_Validate(Cancel As Boolean)
     RaiseEvent Validate(Cancel)
    End Sub
    Private Sub UserControl_Resize()
    Calendar1.Width = Width
    Calendar1.Height = Height
    End Sub
    Public Sub AboutBox()
    Calendar1.AboutBox
    End Sub
    Nom : Sans titre.png
Affichages : 6595
Taille : 140,2 Ko
    Dernière modification par Invité ; 15/03/2017 à 13h56.

  8. #8
    Invité de passage
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2018
    Messages
    1
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Pyrénées Atlantiques (Aquitaine)

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Septembre 2018
    Messages : 1
    Par défaut Un grand merci !
    Bonjour,
    Je démarre le VBA et son application formulaire. Je cherchais comment afficher un calendrier sur mon formulaire et le code source que vous
    avez posté est fantastique. Merci beaucoup pour cette ressource.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Faire un calendrier dans une jsp
    Par barouz dans le forum Servlets/JSP
    Réponses: 5
    Dernier message: 29/01/2009, 15h32
  2. Réponses: 21
    Dernier message: 29/11/2006, 22h51
  3. Réponses: 6
    Dernier message: 28/06/2006, 15h01
  4. [Dates] mettre un calendrier dans une pagephp
    Par Tr@nkill dans le forum Langage
    Réponses: 12
    Dernier message: 07/04/2006, 14h19
  5. [VBA-O]Calendrier dans un formulaire outlook
    Par imhotep_zr7s dans le forum VBA Outlook
    Réponses: 4
    Dernier message: 09/02/2006, 21h25

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo