Results 1 to 3 of 3

Edit checking before inserting a new diagram for multiple components

Threaded View

yunesm Edit checking before... 01-22-2010, 12:05 PM
blane245 Re: Edit checking before... 01-22-2010, 12:45 PM
yunesm Re: Edit checking before... 01-22-2010, 02:34 PM
  1. #1
    Forum Contributor
    Join Date
    10-28-2009
    Location
    Portland, Maine
    MS-Off Ver
    Excel 2003
    Posts
    102

    Edit checking before inserting a new diagram for multiple components

    - I have some buttons set-up to insert pre-set diagrams from sheet “FISH PARTS” onto sheet “THE JUMPER FISHBONE”
    - However, before inserting a new diagram onto sheet “THE JUMPER FISHBONE” I need to make sure the default diagram components are all gone.
    - There are seven components all with structure Like “BONE_*”
    - If one or more of these components are present I want to display a message to confirm the user wishes to delete the default diagram and insert new chart (or abort is they do not wish to delete the default)
    - some explaination of structure below
    - spreadsheet also attached

    Sub CHART_TYPE_FISHBONE_6()
    
    ‘Check for: "BONE_*" worksheet “THE JUMPER FISHBONE”
    ‘If one or more of these objects are present: MsgBox "Do You Really Want to Delete ‘Default Fishbone Diagram?"
    ‘User Selects Yes or No
    ‘If  no, abort and do nothing
    ‘If yes, delete all "BONE_*" and (run code below)
    
    On Error Resume Next
    ActiveSheet.Shapes("FISHBONE_6").Select
    If (Err.Number <> 0) Then
        On Error GoTo 0
        Sheets("FISH PARTS").Select
            ActiveSheet.Shapes("FISHBONE_6").Select
                Selection.Copy
                    Sheets("THE JUMPER FISHBONE").Select
                        Range("C3").Select
                            ActiveSheet.Paste
    Else
        On Error GoTo 0
        MsgBox "6 Bone Fishbone already exists"
    End If
    
    End Sub
    Attached Files Attached Files
    Last edited by yunesm; 01-22-2010 at 02:36 PM. Reason: Solved

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