Results 1 to 15 of 15

Turning off visuals when I use a macro button.

Threaded View

  1. #8
    Registered User
    Join Date
    04-04-2011
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Turning off visuals when I use a macro button.

    I have 4 worksheets that I deal with in the code. "FORMULAS, INPUTS, OUTPUTS, LOAD."

    In "LOAD" I take 3 user defined specifications (3 columns) and allow the user to make as many rows as they would like. Currently there are restrictions but I'm not ready to deal with them yet. As of now the code works.

    The "FORMULAS" worksheet takes one row at a time from "LOAD" and changes all necessary data. Then I copy that data from "FORMULAS" to "INPUTS" or "OUTPUTS."

    
    Sub Rectangle_Click()
    Sheets("Load").Select
    Range("A2").Select
    
    
    Do
    
        If ActiveCell.Offset(0, 1).Value = "xxxxx" Then
        
            Call Copy
            
        End If
    
       ' Sheets("Load").Select
       ' ActiveCell.Offset(1, -3).Select
        
    Loop Until IsEmpty(ActiveCell)
    
    
    End Sub
    
    Sub Copy()
        
        Selection.Copy
        Sheets("Formulas").Select
        Range("G2").Select
        ActiveSheet.Paste
        
        Sheets("Load").Select
        ActiveCell.Offset(0, 2).Range("A1").Select
        Application.CutCopyMode = False
        Selection.Copy
        Sheets("Formulas").Select
        ActiveCell.Offset(0, 2).Range("A1").Select
        ActiveSheet.Paste
        
        Sheets("Load").Select
        ActiveCell.Offset(0, 1).Range("A1").Select
        Application.CutCopyMode = False
        Selection.Copy
        Sheets("Formulas").Select
        ActiveCell.Offset(0, 1).Range("A1").Select
        ActiveSheet.Paste
        
    
        Range("A4:F61").Select
        Application.CutCopyMode = False
        Selection.Copy
        Sheets("Master_Inputs").Select
        '''''''''''''''''''''''''''''''''''''''''''
        Do
            If IsEmpty(ActiveCell) = False Then
                
                ActiveCell.Offset(1, 0).Select
                
            End If
            
        Loop Until IsEmpty(ActiveCell) = True
        '''''''''''''''''''''''''''''''''''''''''''
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
            
        Sheets("Formulas").Select
       Range("A63:F79").Select
        Application.CutCopyMode = False
        Selection.Copy
        Sheets("Master_Outputs").Select
        '''''''''''''''''''''''''''''''''''''''''''
        Do
            If IsEmpty(ActiveCell) = False Then
                
                ActiveCell.Offset(1, 0).Select
                
            End If
            
        Loop Until IsEmpty(ActiveCell) = True
        '''''''''''''''''''''''''''''''''''''''''''
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
            
        Sheets("Load").Select
        ActiveCell.Offset(1, -3).Select
    
    End Sub
    EDIT: The point of my program is taking a little bit of user information and generating a specific sheet that manually would take hours to generate.
    Last edited by Brad4444; 04-05-2011 at 11:33 AM.

Thread Information

Users Browsing this Thread

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

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