+ Reply to Thread
Results 1 to 3 of 3

Checkbox VB code isnt performing properly

  1. #1
    Registered User
    Join Date
    11-06-2014
    Location
    Alabama
    MS-Off Ver
    Office 365, Office 2013
    Posts
    26

    Checkbox VB code isnt performing properly

    I have a checkbox (activeX) that, when checked, should copy the data from two cells and paste them in two other cells. If the box is unchecked it clears the destination cells. When I click on it, it looks like it runs, the destination cells are briefly highlighted but nothing happens. I am getting no errors and debugging shows no problems. Can someone please help?

    Private Sub CheckBox1_Click()
    If ActiveSheet.Shapes("Check Box 1").OLEFormat.Object.Value = 1 Then
    Range("Q2").Select
    Selection.Copy
    Range("H6").Select
    ActiveSheet.Paste
    Range("R2").Select
    Selection.Copy
    Range("I6").Select
    ActiveSheet.Paste
    ActiveSheet.Paste
    Application.CutCopyMode = True
    Else
    Range("H6").Select
    Selection.Cut
    Range("I6").Select
    Selection.Cut
    Application.CutCopyMode = True

    End If

    End Sub

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,177

    Re: Checkbox VB code isnt performing properly

    indent for readablility
    and the action is not cut, but clear

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-06-2014
    Location
    Alabama
    MS-Off Ver
    Office 365, Office 2013
    Posts
    26

    Re: Checkbox VB code isnt performing properly

    Hey thanks for the reply, I entered that code but getting basically the same thing. It isnt copying the data when the box is checked.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Data from one sheet isnt populating properly if certain valuse are removed
    By menor59 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-21-2013, 09:33 PM
  2. Replies: 4
    Last Post: 08-29-2012, 02:45 PM
  3. worksheet change event - my code isnt working
    By tinkerbelle in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-17-2010, 06:58 AM
  4. why this code isnt working?
    By briana banks in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-26-2008, 04:38 AM
  5. [SOLVED] data subtotalling isnt working properly on my spreadsheet
    By robert in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-19-2006, 11:30 AM

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