Tuesday, February 23, 2016

Troubleshoot:VBA code to change numerous other macros Error

VBA code to change numerous other macros

Hi,
I'm looking for the most simple solution to a problem I'm having (as I'm still a novice at this kind of stuff).
 
I currently have numerous macros that go into specific folders (e.g.
"Folder July 2013") and copies data out of the workbooks in the folder.
Currently I have the file directory as:
strFileDirectory = "D:\Documents\Folder July 2013"
 
Is there a way where I can put the month (e.g.
"August") in a cell in excel, and then get the macro to populate that part of the file directory, but keep the rest of the folder name constant? And then to go further, have another cell to put "2013" or "2014"
etc in and that updates the file directory with the correct year as well.
 
For example, the file directory above copies out the data from workbooks in July, but if I were then to decide I want to copy from the August folder (hence the file directory is D:\Documents\Folder August 2013), I would like to put August in a cell on the
"Coversheet" tab of the workbook and then run the macro and it goes to "D:\Documents\Folder August 2013" instead?
 
I have had people suggest I put a look up function in but with my limited knowledge I can't get this to work properly.
I was looking at maybe doing something along the lines of the below, where Macro WB.xlsm is the excel file name, Coversheet is the tab name, and Month is the cell name.
 
Dim LookUpRng As Range
Set LookUpRng = Workbooks("Macro WB.xlsm").Names("Coversheet").Month
strFileDirectory = "D:\Documents\Folder" & LookUpRng & "2013"
 
Any help would be greatly appreciated :)
Bec

Solutions to the Problem VBA code to change numerous other macros

Download Error Fixer for Free Now

Hi,
try this sample
in cell A1 (in sheet1 tab) drop down list/menu
January, Feb , March,...
in cell A2 (sheet1 tab) also, drop down
2010, 2011, 2012, 2013,....
 
now,
strFileDirectory = "D:\Documents\Folder " & Sheets("Sheet1").Range("A1").Value & " " & Sheets("Sheet1").Range("A2").Value

  • Download the Microsoft Windows ISO (installation device) from the following website:
  • http://www.microsoft.com/en-us/software-download/windows10
  • Users must select the appropriate ISO, either 32 bit or 64 bit, depending upon their individual computer.
  • Extract the ISO file to a separate USB device or burn the program to a compact disc.
  • Run the Microsoft Windows 10 upgrade directly from the software that you have thus created.

Another Safe way to Fix the Problem: VBA code to change numerous other macros:

 

 

How to Fix VBA code to change numerous other macros with SmartPCFixer?

1. Download SmartPCFixer . Install it on your system.  Click Scan, and it will perform a scan for your computer. The junk files will be shown in the list.

2. After the scan is finished, you can see the errors and problems need to be repaired. Click Fix All.

3. The Fixing part is finished, the speed of your computer will be much higher than before and the errors have been fixed.


Related: Anyone Having Trouble Opening Yahoo Mail Through IE8?,0x80070001 Error When Doing Windows Backup,Active X Controls I E 9,After Sending An E Mail,the Lower Right Corner Now Shows, Sending Mail, Rather Than Connecting And Stops Normal Activity Of E Mail Functions. How To Get Rid Of "sending Mail" Notice,Assembling A Manuscript With Multiple Chapters In Individual Files,Printer No Printing From Email,How To Sum Range VBA Depending On Fill Down,Comparision Of Two Cell At A Time & Result In Tick,Windows 7 Pro Freezes Windows Every 60 Seconds When Using Windows Applications,Windows 8 And Pinning On Start Menu,Recorded Dvd Movies And Sound Do Not Sync.,How To Format Fat 32,Simple Table Not Behaving Correctly,Word Starter Open With Previous Document,IE 11 Seems Notto OPEN When Pinned To Taskbar.
Read More: Unindentified Network connected but no internet access. Wind,error 421, error no. 0x800CCC0F; and Socket erroe 10053, with the same 0x...error message.,Solution to Error: Speed-up my computer shut-down.,How to Resolve - Can I get Microsoft Office Starter 2010 back??,Solution to Error: Vista Ultimate continually loses wireless network connection,IE 8 Need to print youtube embedded static images on regular web pages.,SEARCH INDEX CHANGES WITHOUT PERMISSION,Display Mode Selection and Aero Previews Disappear,SYSTEM_SERVICE_EXCEPTION from netio.sys started 2 days ago for no apparent reason,I have a backup program surviving from a previous computer. How can I remove it?

No comments:

Post a Comment