+ Reply to Thread
Results 1 to 2 of 2

Using part of cell entry as file name

Hybrid View

ANDREWA Using part of cell entry as... 12-07-2012, 06:40 AM
StephenR Re: Using part of cell entry... 12-07-2012, 06:45 AM
  1. #1
    Registered User
    Join Date
    08-12-2009
    Location
    Cardiff, Wales
    MS-Off Ver
    Excel 2007
    Posts
    53

    Using part of cell entry as file name

    Hi, Im using the following line in vba to save a file, getting the file name from a cell, works perfectly.
    FileName = ThisWorkbook.Worksheets("Master File").Range("A3").Value
    But, I want to only use the last 5 digits of the cell entry as the file name. Thought the following would do it, but doesnt work, what am i doing wrong? Help?
    FileName = ThisWorkbook.Worksheets("Master File").Right(Range("A3").Value, 5)

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Using part of cell entry as file name

    FileName = Right(ThisWorkbook.Worksheets("Master File").Range("A3").Value, 5)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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