+ Reply to Thread
Results 1 to 3 of 3

Microsoft Monthview .visible = True not working

  1. #1
    Registered User
    Join Date
    07-03-2015
    Location
    Anchorage, Alaska
    MS-Off Ver
    2007
    Posts
    20

    Microsoft Monthview .visible = True not working

    I have searched the forum and couldn't find an answer to this. I am trying to fill in dates in text boxes on a userform. I have two text boxes and a monthview control. I only want the monthview control to be visible after a textbox is entered. After a date is selected, it should fill the text box in with the selected date and then the monthview control should be invisible until one of the text boxes is entered. Filling the text boxes and hiding the monthview control works fine. The problem is after the monthview is no longer visible, the general_date_pick.visible = True line doesn't work anymore.

    Any ideas? Code below:

    Private Sub start_date_Enter()
    current_box = "start_date"
    general_date_pick.Visible = True
    End Sub

    Private Sub end_date_Enter()
    current_box = "end_date"
    general_date_pick.Visible = True
    End Sub

    Private Sub general_date_pick_DateClick(ByVal DateClicked As Date)
    Controls(current_box).Value = DateClicked
    general_date_pick.Visible = False
    End Sub

  2. #2
    Registered User
    Join Date
    07-03-2015
    Location
    Anchorage, Alaska
    MS-Off Ver
    2007
    Posts
    20

    Re: Microsoft Monthview .visible = True not working

    Also, how can I easily call the name of the text box that was entered? It could be nice to not have to put the name of the text box in parenthesis because I could potentially use this code for a lot of different text boxes on the userform.

    Thanks.

  3. #3
    Registered User
    Join Date
    07-03-2015
    Location
    Anchorage, Alaska
    MS-Off Ver
    2007
    Posts
    20

    Re: Microsoft Monthview .visible = True not working

    I figured out a solution. I just added the line Me.Repaint and it works.

    Is there a better way?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] .Visible property not remaining true (or even becoming true) when code runs.
    By SocratesJC in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-07-2015, 06:20 PM
  2. PivotItems visible = True
    By z_eeen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-05-2014, 12:04 PM
  3. [SOLVED] Multiple TextBox / Label.Visible = True
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2013, 09:35 AM
  4. [SOLVED] Condensing ActiveSheet.Shapes().Visible=True
    By eculver in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-15-2013, 07:52 PM
  5. VBA userform Textbox visible = true
    By Hilton1982 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2012, 03:19 AM
  6. Chart is invisible but Visible attribute is TRUE
    By 6StringJazzer in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-16-2011, 02:46 PM
  7. Shapes.visible = false/true
    By Ctech in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2006, 10:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1