I`m trying to create a macro that produces an index of jpgs contained in a folder.
I need also some properties of the file. With these I will create a new naming system and rename existing files. To do part of this I copied from here a macro and adapted it. Copied: i.e. I don`t know much!!!
Problem 1)
Initially it worked, then "Run-time error 53, file not found" started appearing without me being aware of making any changes to the code.
Problem 2)
I would like to capture some of the properties of the files (pics from digital camera). Which jpgs properties can I access to and how?
What about exif data?
Explorer shows 3000x2000 pixels. Can I get this too?
Sub Get_Folder_Contents()
Dim folderstring As String
Sheets("Sheet1").Select
folderstring = ThisWorkbook.Path
f = Dir(CStr(folderstring & "*.jpg"))
n = 2
Do While Len(f) > 0
Cells(n, 1) = folderstring
Cells(n, 2) = f
Dim fs, fl
Set fs = CreateObject("Scripting.FileSystemObject")................
1. Form Templete & 2. Student Data Index. (Both files will be placed in same folder)
About Form Templete : This is a simple form, containing some fields. Fields which i require are Form No., Student's name & Standard.
About Student Data Index : This file is to maintain records. Each time when I fill form for a new student i will copy paste the form templete file & rename it by form no. (Entered in the Form Templete file, Form No. field)
My question is : Is it possible that whenever i create a new file in the same folder with student's name the required fields in the Student data Index get filled automatically, apart from that the new file created get hyperlinked & when i click on form no. the form for that student gets open?
i have one excel sheet (refer attach) i give some example 7 to 8 customers, but in sheet nos. Of customer name a to z suppose to 3000 customer list. Now i want to create automatic customer alfa- numaric code.
I found some code that works well to index a folder and all sub-folders for file names.
The issue is that the folder used is coded in an excel spreadsheet (cell C7) in the below code and whether to look in sub-folders (cell C8 - True or False).
Code: Sub ListFiles() iRow = 11 Call ListMyFiles(Range("C7"), Range("C8"))
[Code]....
I have tried to incorporate the browse for folder and select if sub-folders are used, but it isn't working.
I would like to build an index sheet from multiple sheets in a folder(directory). Let's say I have a folder with sheetA.xls, sheetB.xls and sheetC.xls. I would like to automatically create an "index" sheet that lists the sheet name and info from cells B2 and cell C3 all on a single row. So my index sheet might look something like this:
sheetA Portland Oregon sheetB Seattle Washington sheetC Reno Nevada
I make calculations for these projects using an excel file. In this excel I also type the projectnumber (cell J2)
Now i would like to make a button. When pressed, it checks the projectnumber cell J2, looksup the corresponding folder and saves the excelfile in PDF format in this folder.
I have found macro to find files in folders, but none which do the above.
I need a macro in a workbook to look at all the files in the same folder that have "*att*.xls" in the name and determine and copy from the range A15:W515 only the rows that have data in at least columns A, C and D. Each file will vary as to how many rows there will be and there are more than the files with "*att*.xls" in the folder. The data will be on the only worksheet in each file and the worksheet is named "G2WAttendee_xls" the data from all the files need to be copied to the file called "Consolidated webinar reports.xls" (I am using Excel 2003) and to a sheet called "Attendance Data" and added to the end of the last paste.
At the start of the macro the current file "Consolidated webinar report.xls" should be saved to a sub folder of the current directory and have the date saved added to the name. The sub folder is called "Completed reports". The data in the original file on worksheet "Attendance Data" should be deleted.
At the end of the process all the files that have had data copied from them should be moved to the sub folder "Attendance reports consolidated" (This could be done as each file is closed if that is easier).
I have headings in row 1 of the "Attendance Data" worksheet that match the headings in the various files in the folder (which will always be in row 14 of the individual "*att*.xls" files).
The folder with all the files and the "Consolidated webinar report.xls" file is at path "Z:P and S MEvaluationsWebinar series 2012-13TB".
I have up to 50 workbooks in one folder with data in a specific range. I also have one workbook which includes additional data, including conditional formatting and dropdowns. I need to copy the desired range from the first workbook in the source folder to the second workbook, then save the latter to my destination folder, using the same name as the first. I need to repeat this process for all workbooks in the source folder.
I have an Excel VBA Macro for creating/logging drawing numbers. Each drawing belongs to a job number. Each job number has a folder name containing the job number followed by a description (ie 999999 - bracket assembly) for storing drawing pdf's. The job number is only known as a 6 figure number in the drawing creation process BUT for the PDF saving process it is a string value...as my example above
I have to change my process by pre-creating the Job Number folder, then have the macro look for the appropriate folder by searching the parent folder for a sub folder containing the job number (always the first 6 figures).
I want to insert in my macro some code that searches...
The parent folder for a folder containing the job number. The macro value for the parent folder is P:engineeringdrawings (this never changes). the macro value for the job number is iOpenair (it's an entry that is entered as start the macro). Imagine the value for the job number is "999999"...so the search would be for "999999*.*" The code needs to search the parent folder, find the folder name that begins with a six digit number. Capture the complete name of the folder and store that name as a Dim value that I can call up elsewhere in my macro.
I am creating a document for work that automatically generates hyperlinks to pdf files in a given sub folder. Currently I have a section of code that opens a window to choose the folder location.
Code: 'Prompt user to select a directory Do Problem = False Set ShellApp = CreateObject("Shell.Application"). _ Browseforfolder(0, "Please choose a folder", 0, "c:\")
On Error Resume Next
[Code] ........
What I actually want is to not have the window open, but excel automatically choose the sub folder location.
The directory looks like this Z:ClientProjectDRAWINGS-2 RECORD COPIESPDF
The xlsm file is stored in the DRAWINGS folder, and I need it to point to the PDF folder.
I have a list of items in an excel sheet... 500 of them... and there are images for them in an other folder... The problem is those images are in 1000's and I only need those 500 images.. Images are saved as "SKU.jpg eg NS2354.jpg and we have an SKU column in excel as well .. SKU and their images have same name...
Is there any solution to pick up only those 500 images from those thousands of images?
Is it possible to save those 500 images in an other folder?
I would like to create a code that will open all workbooks in folder "A" one at a time and then close the work book after another code is executed. So one workbook will open and while the workbook is open, I will call another code to format the active workbook and then the active workbook will be saved in folder "B" and closed and go to the next workbook in folder "A" to start all over. The folders are saved on the desktop.
What I'm hoping to do is just look for the 4 digit number on the end finding that folder name and opening it up. The name conventions before the 4-digit serial number are quite random. Sometimes it includes their full first name, other times it's just an initial for the first name and other times there are other characters included in the name. The one thing that is constant is the 4 digit serial number on the end.
how I could get the Open dialog box to pop up and have the chosen folder number open?
I have a table which holds scores as well as other data for players. Is it possible to automatically sort a table based on their points score to see who is top of the league?
I am inputing each day the total amount of sales. I am manually doing the averages for past 12 weeks on Monday sheet. I would like when I enter the amount for that week that the cells B84, C84, E84, F84 are automatically updated for the past 12 weeks. I have tried a few different approaches but I keep getting #ref or circular reference
I'm trying to create a bug reporting tool (with a bunch of text boxes and drop down lists) and have the following problems...
1. I would like to get a unique number inserted automatically in a textbox (it's supposed to be the bugs id (1001). How do I do this? And when I click OK after inserting all info I want this number to become +1 so the next defect can be added immediately.
2. Why are my drop down lists empty as default and their values only appear if I enter a value. Why aren't the lists displayed when i just click on them?
3. I have a multipel row text box. How do I get the text to jump to the next row automatically instead of using crtl + enter?
A1 contains "=2+3+4" which shows 8 as a result. I would like to add a word "Lbs" with it so it would display "8 Lbs" on the same cell. If I entered =1+2+3 on cell A6000, it should give me "6 Lbs".
formula for input values.I need to put in table_1 every to each fourth row each first row from table_2.
For example:
in table_1 A1 input A1 from table_2 in table_1 A5 input A2 from table_2 in table_1 A9 input A3 from table_2 in table_1 A13 input A4 from table_2 And so on.
Table-1 B C D E F Adda Zakeera 1239987801310037 Ahmed Pur East 5559998803310042 Ahmed Pur East-2 8888874805510041 Arifwala 3545555805510045 Bahawalnagar 3336666802610046 Bahawalnagar-2 1257777806610038 Bahawalpur 2206666804410044 Bhakkar 2223333805610042
I want to arrange my data like Table-2. I have tried vlookup() formula, it worked but every time I puldown the formula I have to manually increase cell # (e.g) In the row of Adda Zakeera, I have 4 values. When I use vlookup() and drag it downward the values should be shown as in Table-2 under Adda Zakeera.
=VLOOKUP($D$2, Sheet1!$B$4:$AF$90,2,0)
Table-2 D E F G H I J Ahmed Pur EastAhmed Pur East-2 Adda ZakeeraBahawalnagarBahawalnagar-2BahawalpurBahawalpur-2 555 888 123 333 12548 2201#N/A 555 888 9987 333 77777 66666#N/A
I'm working on Excel sheet which cover period of time, I specify the period on the top, (cell E4= FROM : cell G4= TO) then I have to fill column (B) with the days name, and fill column (C) with the starting date from beginning till the end date.
I'm getting this work by a VBA code, and if it's possible to have the days names in Arabic language, and set the print area from (A1) till the (next) row after the last day in the column i.e cell (G39)
how to print automatically from Excel to a PDF file. After a couple of days of searching and tweaking, I've got what I think is a fairly good solution for automating your printing of worksheets to PDF files.
This solution requires the use of PDF995. This is a free utility available at www.PDF995.com. This is a print driver that allows you to print to a PDF file. The file is compatible with Adobe and can be read with the Adobe reader like any other PDF. The free version does pop-up some advertising with each print, but the automation works with around the pop-ups. I believe the full license version is about $10 and doesn't produce the pop-ups.
The challenge in automating a PDF process is that the PDF driver will prompt the user for a filename. This is ok if you are printing just one sheet, but if you need to automate the production of several PDFs, you need to be able to specify the name of the file in the code. The subroutine SheetToPDF presented below allows you to specify a single worksheet and the full filename for the PDF. I've included all the code and external declarations needed. The two subs at the bottom give examples of how to call SheetToPDF with the passed parameters.
'Needed to Read INI file settings Declare Function GetPrivateProfileString Lib "kernel32" Alias _ "GetPrivateProfileStringA" (ByVal lpApplicationName As String, _ ByVal lpKeyName As Any, ByVal lpDefault As String, _ ByVal lpReturnedString As String, ByVal nSize As Long, _ ByVal lpFileName As String) As Long
'Needed to Write INI file settings Declare Function WritePrivateProfileString Lib "kernel32" Alias _ "WritePrivateProfileStringA" (ByVal lpApplicationName As String, _ ByVal lpKeyName As Any, ByVal lpString As Any, _...........................
Is it possible to set a formula or something up so that if a row contains certain information, then the row will turn a certain color? For instance, if cell B2 contain the number "3" and cell B5 contains the number "5", then row B will turn yellow. Then if cell C2 contains the number "4" and cell C5 contains the number "7", row C will turn blue. This is just an example. In this example, I'd like a formula all the way down column's 2 and 5, but only the rows would change color (not columns) according to their information.