Consulting

Results 1 to 3 of 3

Thread: Sleeper: Excel 2003 Convert to 2007 xlsm file

  1. #1
    VBAX Newbie
    Joined
    Apr 2008
    Posts
    4
    Location

    Question Sleeper: Excel 2003 Convert to 2007 xlsm file

    When I convert a 2003 file to 2007 file via "Convert" or "Save As", my ActiveX Control names are renamed to the default. For example in Excel 2003 the default for Activex command control is "CommandButton1", but I set the property name to "cmd_load_source_data" to distinquish from other Activex controls. The 2007 conversion changes the control back to "CommandButton1", so the controls are disconnected from the VBA code (see below).

    Private Sub cmd_load_source_data_Click()
    Call Module1.get_data
    End Sub
    
    Private Sub CommandButton1_Click()
    
    End Sub
    If I had used Form Controls instead of ActiveX controls, the conversion would be fine. It appears I will need to touch each Excel file before conversion. Any alternatives would be appreciated.

  2. #2
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    This is just as idea, I haven't tested it: In the original version, write a procedure to loop through every form and it's controls and place the control name in the tag property. Then convert the file and run a another procedure to rename every control to the value of it's tag property and recompile.
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

  3. #3
    VBAX Newbie
    Joined
    Apr 2008
    Posts
    4
    Location

    Smile Excel 2003 Convert to 2007 xlsm file

    Good idea on use of tags. I will let you know how it turns out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •