Userforms keep popping up, need code to stop it

Discussion in 'AutoCAD' started by rammieib, Feb 23, 2006.

  1. rammieib

    rammieib Guest

    Hey

    I've tried unsuccessfully to stop userforms coming up in the following
    code. What can I put in in the different places to stop the userforms
    appearing (or the suerform appears and the clcik on the userform button
    to happen automatically with screen application off.) Thanks.

    Sub opensesame()
    Dim change As Variant

    clear2

    Application.Dialogs(xlDialogOpen).Show USERFORM APPEARS HERE
    Application.ScreenUpdating = False
    change = ActiveWorkbook.Name
    Cells.Select
    Selection.Copy
    ActiveWindow.ActivateNext USERFORM APPEARS HERE
    Range("A1").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
    SkipBlanks _
    :=False, Transpose:=False
    Range("A1").Select
    Workbooks(change).Activate USERFROM APPEARS HERE
    Application.CutCopyMode = False
    Application.DisplayAlerts = False
    ActiveWorkbook.Close USERFROM APPEARS HERE
    Application.ScreenUpdating = True
    On Error Resume Next
    Set rng = Application.InputBox( _
    "Select Range to Examine, this will be the range over which your
    previous grid ran", Type:=8)
    Application.ScreenUpdating = False
    On Error Resume Next
    If rng Is Nothing Then Exit Sub
    rng.Select
    Selection.RowHeight = 15
    Selection.ColumnWidth = 1.5


    rng.Select
    etc etc etc

    End Sub
     
    rammieib, Feb 23, 2006
    #1
  2. rammieib

    the wiz Guest

    What do the userforms/dialogs say?
     
    the wiz, Apr 10, 2006
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.