Hi Guys,
I have a little problem, everytime when I need to run macro the name of files are changed. I want to automatize it maximally as I can and it need to be friendly for newbies.
How can I assign name of chosen files to macros using box like below?
Need to run twice this box, choose file...
Hello,
Can anyone please tell me how to use Application.GetOpenFilename to return the filepath without the filename or is there a different way to do it?
Thanks
Hello,
I need some assistance with VBA to open a file where the year, month, and days change on a daily basis.
The filepath will be as such:
S:\NPH Accounting\NPH Accounting Department\Treasury\2016\5 NPH FundServ\01 Daily\DTCC Settlement Reports Daily\05 Current Day DTCC Settlement\05 NPH\12...
Hello all,
First off I want to thank you for taking the time to read my post. Second off, if someone else has posted about this and come up with a solution, could you kindly send me a link to that post.
So before I start posting code I want to ask if what I want to do is possible. What I would...
Hello,
I am trying to write a vlookup function where we are extracting numbers from different files in the same folder.
This is what I have:
=VLOOKUP(A1,"'M:\Funds\0-Valuations\Valuations 2016\Valuations Q2 2016\["&B1&" Valuation Calcs 06-30-16.xlsx]Investment History'!$D$3:$E$300",2,FALSE)...
I would like to add a hyperlink(of its file path - sName+sPath) to each cell in row "A" on my activesheet, I couldn't find a way to do it without overhaul the whole thing.
It would be great if you can help out.
Many thanks.
Here is what I got:
Sub PendingReviewers()
<code style="margin: 0px...
I have a code below:
---------------------------------------
00 Dim filename As String
01 filename = "C:\ExcelVBA\test.xls"
02 Dim sn As Object
03 Set sn = Excel.Application
04 sn.Workbooks.Open filename
05 ' sn.Workbooks(filename).Close
06 Set sn = Nothing...
All,
First time poster and VBA novice. I am trying to have VBA open a file on a shared drive where the file path can change. Therefore, I would like VBA to use the file path specified in cell A1 on "Report" tab. I can get the results by embedding the file path in the code, but this is not...
Hello,
I am far from an expert in excel and I desperately need help with Macros.
I have a date in cell B4 and a name in Cell C1.
I have set up folders in my location path with all the dates that I want to use.
How do I use a Macro to save the file like below?
"W:\\Programme\Department...
I am generating a workbook in 2007 (customer requirements, not mine) and have the following code which generates a separate workbook (and emails it) with a subset of the data in the current worksheet:
Private Sub Mail_DataOnly()
On Error GoTo Catch...
Hi, I am using the below code in a large macro. I can't get it to work exactly. I am trying to have the old version of the file (which is the file being opened) moved from the current filepath to an archive folder. I would then save a new version of the folder in the current filepath. The...
I'm hoping this will be easy for someone to answer as I'm new to VBA.
Here is my scenario: there is a single workbook in different subfolders of the same folder, I want to copy 1 worksheet from each of them into a new "master" workbook and keep the sheets separate. The worksheet I want to copy...
I am referencing files from a network drive, however it may be mapped as different letter drives on different users computers e.g. L:\ or R:\.
Is there a way of finding what the drive has been mapped as on the users pc using the UNC file path e.g. \\server\folder\folder\file.xlsm
Ideally I...
Hello ,
i have a long list of file directories on a spreadsheet.
Intially i wanted to seperate the file name. i was able to find a post online which allowed me to do this
get filename from filepath and filename
But now i would like to just have the file path without the file name
So if...
I have a database that stores folders for several different parts. What I am trying to do is have vba code that will find a folder within a part folder labeled "current drawing" and then hyperlink the only file in that folder. This file may change from time to time but there should only ever be...
Hello,
I made a macro to save a file with todays date in a folder. I'll be doing this everyday and I don't want the folder to fill with workbooks. I would like to keep yesterdays and delete the file dated the day before yesterday.
Also If anyone can give me a tip for adding in holidays to the...
Hi all,
I'm hoping this is a nice and simple question; I have the below statement in my MS word Macro which has pulled data from MS Excel and then automatically saves it to a designated directory. Part of the VBA is shown below.
ChangeFileOpenDirectory "Q:\03. BTF Lab\LR Reports"
The...
I've recently got Excel 2007 installed at my work. I had a few macros that used application.filepath.
As this is no longer available in Excel 2007 I wanted to know if there was a work around that someone could share?
More specifically, What I want the code to do is to look in a folder (for...
Hi,
I've mixed and matched the code below to allow the user to browse and select a file in any folder. The macro then loads the filename of all files contained in that folder.
The code does not however load file names in the subfolders. Could the formula be amended to include subfolders...
I'm having problems using variables with filenames.
I have a selection of .html files stored on my hard drive, I want to be able to write a macro that allows me to browse to and select these files (either individually or as a multiple selection), and then have the macro store the filepath(s)...
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.