filename

  1. A

    Open Directory for user to choose a file

    Hello, I hope i can get some help from people whom i regard as super smart. The code below (that i have managed to get from others) finds the username and computer name so that other users would be able to use the same code on their computers. I had hoped that the code would also open the...
  2. K

    Reference a filename created with a formula

    I'm trying to reference a filename and path that I've created with a formula. I can't get it to work either in a formula or with a Macro.
  3. V

    multiple excel files into one VBA - problems whit inputbox

    Hello every body, i hope that some of you guys are able to help me out. i have to get multiple excelfile into one file, but i want to make an inputbox, so that the user are able to choose between different folders. The code looks like this so far: Sub Samling() Dim FolderPath As String Dim...
  4. Alex O

    VBA Edit to Copy all but Sheet2 AND...

    I have my code mostly complete - except for a few minor edits that have me stumped! I need all sheets copied to the new workbook except Sheet2 (ODBC_TABLE). If possible, I'd also like no headings and password protected. Any help would be appreciated. Thanks Sub New_Syscofile() Dim Output As...
  5. crystalneedshelpplzthnx

    Append Duplicate file Path: (1)

    Good Day, I would like some help on appending a duplicate file name during a looped save. Name Name (2) This is my current code: Sub WM_Save_File() Dim Path As String Dim fileName As String 'Move Original File Name Range("d1").Select Selection.Cut...
  6. G

    copy based on NAMES instead of ID

    Hi Everyone, Below i have a code which copies based on cell values(Highlighted) but instead of cell values, can we copy through cell name (Cell names which would be only in "Column C") FolderName = Worksheets("copy").Cells(2, "K").Value & "\" If FolderName <> "\" Then FileName =...
  7. D

    Import File into Table with Import filename and date

    Hello, Can this be possible to add the filename and date when importing excel file. I have a table of import file and i need to add the filename and date to the table for the records purposes. Is also possible to select the file. Any help is much appreciated. Thanks
  8. M

    how to save a sheet as a pdf using the print area in vba?

    I've managed to save an active worksheet as a pdf using the following: Sub save_as_pdf() Dim Path As String Dim filename As String Path = Range("B35") filename = Range("B36") ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, filename:=Path & filename & ".pdf", Quality:=xlQualityStandard...
  9. M

    vba complie/syntax error

    I'm getting a compile/syntax error when i try to run this macro. Can you see what i've done wrong please? Sub filename_cellvalue() Dim Path As String Dim filename As String filename = Range("B31") ActiveWorkbook.SaveAs Filename:=filename, FileFormat:=xlOpenXMLWorkbookMacroEnabled End Sub The...
  10. L

    Formula to Pull data from Dynamic Filename with added calculations

    So basically im trying to make this formula do two things 1) Make it to where the file doesnt have to be opened in order to pull data (file has to be closed in order to do certain edits with my job) 2) Make it to where the file name can be dynamic because its being changed every 30 minutes or...
  11. V

    How to check what rows are grouped.

    My question is, how do I find which consecutive rows are grouped then store those rows and use them for other columns. I'm trying to create a macro that allows me to take data from an excel sheet and place it in bookmarks of a word document. Below is the code I already have Sub DocGenerator()...
  12. T

    Close A File That Is Open Where You Only Know Part Of The Filename

    Hi all, I am trying to close a file using VBA which in itself is quite simple however the file name changes so I only ever know a part of the filename and its location. Location: P:\Public User Area\Purchasing\Suppliers\National Tube Stockholders\Price Review\ The section of the filename that...
  13. B

    VBA Get the Names of All the Sub-Folders within a Folder

    Hello, I am looking for some help with my Code. I am getting a File not Found error whenever I try to use anything but the root directory "C:" for the PathName. Thanks, CB Sub GetSubFolderNames() Dim FileName As String Dim PathName As String PathName = "C:\Temp" FileName = Dir(PathName...
  14. M

    Paste Vales in same row, different columns

    Hello, I would like to paste 3 values in 3 columns A, B, and C in the last available row. Filename = Dir(Path & "*.xls*") DateTimeStamp = DateTime.Now UserName = (Environ$("Username")) 'get last AVAILABLE cell to paste into Set iLastCellS2 = s2.Cells(s2.Rows.Count, "A").End(xlUp).Offset(1, 0)...
  15. J

    Create .csv file from a workbook sheet with new filename and timestamp

    Hi all, Im not great at VBA by any means but since moving to mac I cant seem to do anything i used to do with ease. I am simply trying to create a macro that copies a sheet in my active workbook to a new .csv file with that sheet name as the title and todays date and time in the newly...
  16. E

    Open Multiple files with loop

    I have just upgraded my excel on my mac and have problems with my code and the GrantAccessToMultipleFiles and looping through the excel files in my directory. When the Set wb line executes, I get a Run-time error 1004. Additionally, I want to access a large number of files (>100) in my directory...
  17. R

    Macro Loop?

    Hi I am trying to test this on a folder containing 5 files, it opens all files but it only completes the action on 1 file then seems to freeze excel completely. I am new to the world of Macros and lifted the code from a website, so I am hoping this will be a good way to get an answer. Have I...
  18. D

    e-mail loop macro

    so I have the filename in column A, and e-mail address in column B and C column A a_Cass,Mass_Chen,Victor_ column B cass.mass@x.com column C chen.victor@x.com ..... is it possible to make an e-mail macro that will loop through each filename listed in column A and create an e-mail for...
  19. J

    Dir Do Until Loop not working

    Hi guys! I have this for loop iterating through each folder in a file path, then it goes into the folder and gets the names of the files. Only problem is that while it should be getting the name of every file in each folder, it only gets the name of the first file. So I though a Do Until loop...
  20. S

    Read File Based on Date VBA

    Hi. I need to read a file, based on latest date. Using VBA. I really don't know how to do since before this I only put exact name of the filename. I know how to do it using vb.net, I do like this, Dim stamp As String = DateTime.Now.ToString("yyyyMMdd"...

Some videos you may like

This Week's Hot Topics

Top