Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-23-2014, 11:01 AM
chrisd2000 chrisd2000 is offline Can a macro rename Excel files based on a cellname? Windows 7 64bit Can a macro rename Excel files based on a cellname? Office 2007
Novice
Can a macro rename Excel files based on a cellname?
 
Join Date: Jun 2014
Posts: 16
chrisd2000 is on a distinguished road
Default Can a macro rename Excel files based on a cellname?


Can a macro rename Excel files based on a cell's contents? The problem maybe that I download these files en masse from a website and they all have 54-character long randomly generated filenames which I can rename by selecting all and then use the rename function to get a series of filenames like a, a(2), a(3), ... but I would rather have the files renamed based on the text that exists in cell B1 which is the title of the report. I also read somewhere that this kind of macro only works if the tabs have names like "Sheet 1"
Reply With Quote
  #2  
Old 06-23-2014, 06:50 PM
BobBridges's Avatar
BobBridges BobBridges is offline Can a macro rename Excel files based on a cellname? Windows 7 64bit Can a macro rename Excel files based on a cellname? Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

Sure. Do you know how the SaveAs statement works in VBA? You can provide a document name in quotes, but you can also fetch the report title from B2, or wherever, and use that instead.

If you need more explanation then maybe we should back up; I don't know yet how much you know about writing macros...?
Reply With Quote
Reply

Tags
filename, rename, tabname



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to rename multiple Word file with same suffix ozil61 Word VBA 2 05-06-2014 07:36 AM
Convert old PowerPC file to Intel-based files in Word? walmar Word 0 06-12-2013 07:07 AM
Rename Files gsrikanth Excel Programming 3 05-14-2012 03:03 AM
Macro based on cell value ubns Excel Programming 1 05-07-2012 04:03 AM
Merging word files from excel macro hklein Excel Programming 0 08-05-2011 02:27 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:43 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft