Results 1 to 10 of 10

VBA code clean up help

Threaded View

  1. #1
    Registered User
    Join Date
    02-15-2012
    Location
    entsRif confftent
    MS-Off Ver
    Excel 2007
    Posts
    3

    VBA code clean up help

    Hi, I am new to VBA. Just learning a few things. I wrote a quick macro for a button that copies data in a cell and records it at the bottom of a separate column.

    Three things:

    Would any experienced VBA programmer be able to look at this code and help me clean it up?
    And, is there any way to unselect a cell? After the macro runs, there is a border on the original cell marking at as "selected". I want to get rid of it.
    Is it possible to include a code to save the workbook automatically (just save, not save as.).

    Thanks.

    Macro written below:
    Sub Button2()
    '
    ' Macro for entering Button 2 data into Database
    
        Application.ScreenUpdating = False
        Range("D5").Select
        Selection.Copy
        Range("R5").End(xlDown).Offset(1, 0).Select
        Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
        False, Transpose:=False
        Application.ScreenUpdating = True
    End Sub
    Last edited by recon427; 02-15-2012 at 03:07 PM.

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