Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 07-13-2015, 02:37 PM
brent chadwick brent chadwick is offline Help with if then statements Windows 8 Help with if then statements Office 2013
Advanced Beginner
Help with if then statements
 
Join Date: Mar 2015
Posts: 86
brent chadwick is on a distinguished road
Default

Still stalling on the If line. This is an exit macro when the drop-down is selected. Here's the code, hope I'm posting correctly-if not correct me. Thanks

Code:
Sub LockDD1()
'
' Lock DD1 Macro
'
'
          Application.ScreenUpdating = False
    If ActiveWindow.View.Type = wdPageView Then
        ActiveWindow.ActivePane.View.Type = wdNormalView
    Else
        ActiveWindow.View.Type = wdPageView
    End If
    If ActiveWindow.ActivePane.View.Type = wdNormalView Then
        ActiveWindow.ActivePane.View.Type = wdPageView
    Else
        ActiveWindow.ActivePane.View.Type = wdNormalView
    End If
    If DD1.Value = "1790" Then
    
     'Column box
    ActiveDocument.FormFields.Add Selection.Range, wdFieldFormTextInput
    Selection.PreviousField.Select
    With Selection.FormFields(1)
        .Name = "Column1790"
        .Enabled = True
        With .TextInput
            .EditType Type:=wdRegularText, Default:="X", Format:= _
                "Lower case"
            .Width = 0
        End With
    End With
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.TypeText Text:=", "
    



End If
    
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with if then statements Multiple If statements, Jamal NUMAN Excel 16 11-15-2022 11:59 PM
Countif statements Alaska1 Excel 5 02-05-2015 07:55 PM
Help with if then statements Using IF statements stuwoolf Excel 2 01-10-2015 01:58 PM
Help with if then statements count if statements Alaska1 Excel 1 05-14-2014 08:21 AM
IF statements that shifts to right. kent Excel 0 01-19-2006 02:23 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:52 PM.


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