+ Reply to Thread
Results 1 to 2 of 2

Changing workbook name in macro

  1. #1
    Dutch76
    Guest

    Changing workbook name in macro


    I want to change (in a macro) a workbook name before saving. For
    instance: the original file is opened as "test.xls", an InputBox asks
    for the extension (here: _abc) and on saving the name should be
    "test_abc.xls". I don't want the original file to be overwritten. How
    can I achieve this?


    --
    Dutch76
    ------------------------------------------------------------------------
    Dutch76's Profile: http://www.hightechtalks.com/m829
    View this thread: http://www.hightechtalks.com/t2343497


  2. #2
    Bob Phillips
    Guest

    Re: Changing workbook name in macro

    With Activeworkbook
    .saveas filename:= left(.name,len(.name)-4) & ib_value & ".xls"
    End With

    --

    HTH

    Bob Phillips

    (remove nothere from the email address if mailing direct)

    "Dutch76" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I want to change (in a macro) a workbook name before saving. For
    > instance: the original file is opened as "test.xls", an InputBox asks
    > for the extension (here: _abc) and on saving the name should be
    > "test_abc.xls". I don't want the original file to be overwritten. How
    > can I achieve this?
    >
    >
    > --
    > Dutch76
    > ------------------------------------------------------------------------
    > Dutch76's Profile: http://www.hightechtalks.com/m829
    > View this thread: http://www.hightechtalks.com/t2343497
    >




+ Reply to Thread

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