Results 1 to 2 of 2

Thread: Move Button on Outllook Form

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Newbie
    Joined
    Jul 2014
    Posts
    5
    Location

    Move Button on Outllook Form

    Good Morning back again,

    Could someone suggest the way to move the location of a macro button. I have a button located on a form which is covering over a label and a text box which are not visible. Depending on which option is selected the label and text box become visible which means that I need to move the button down the form.

    The button is names "Submitbut" and I have tried Submitbut.Move 1134,13608,0,0 (This is on the principle that 1cm = 567 twips)

    I have tried other but the button just disappears.

    ------------------------
    Private Sub PermitTypeComboBox_Change()
    Dim YearPermitEndDate As Date
    Dim SixMonthPermitEndDate As Date
    'Dim EndYear As Date
    'Dim MidYear As Date
    
    
    'EndYear = "31/08/" & Year(Date)
    'MidYear = "31/03/" & Year(Date)
    
    
    'YearPermitEndDate = DateAdd("yyyy", 1, EndYear)
    'SixMonthPermitEndDate = DateAdd("yyyy", 1, MidYear)
    
    
    YearPermitEndDate = "31/08/2016"
    SixMonthPermitEndDate = "31/03/2016"
    
    
    
    
    If PermitTypeComboBox.Text = "Yearly Permit" Then
    PermitEndDateComboBox.Text = YearPermitEndDate
    PermitEndlbl.Visible = False
    PermitEndDateComboBox.Visible = False
    
    
    ElseIf PermitTypeComboBox.Text = "6 Month Permit" Then
    With PermitEndDateComboBox
    .AddItem SixMonthPermitEndDate
    .AddItem YearPermitEndDate
    End With
    PermitEndlbl.Visible = True
    PermitEndDateComboBox.Visible = True
    Submitbut.Move 1134, 13608, 0, 0
    
    
    End If
    End Sub
    ---------------------------

    Thank you

    Pjawynn
    Last edited by SamT; 06-21-2015 at 07:51 AM. Reason: Formatted code with # icon

Posting Permissions

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