I'm trying to write a set of macros and one of the macros needs to move a folder with subfolders from P:CJ to P:WO
Now I've been using the CopyFile State. Is there something similar because in my search they talk about using FileSystemObjects and I have now clue how to use those.
The macro will need to import text from a file (file.out) located in iteration folders (iteration_001, etc) but I need to start by seaching the location that the excel file has been saved in.
which part of this macro I need to edit to make it open a folder I want?
Sub OpenFolderRequest() YesNo = MsgBox("Would you like to open the folder to see" _ & vbCr & "which files are currently there?", vbYesNo + vbQuestion, "Open Folder?") Select Case YesNo Case vbYes myval = Shell("c:winntexplorer.exe c:winnt", 1) Case vbNo End Select End Sub
I have tried changing the (c:winntexplorer.exe c:winnt) to the location name of the folder I want to open (S:Stock ControlSTOCK CONTROLOrder Confirmation)but it doesn’t seem to work.
I am trying to generate a folder within a specific location (For now lets call it C:Jobs) that will be named as per the adjacent cell (Column H on attached)
Obviously if the folder already exists I want the code to stop.
But this code will have to generate a different folder for each row within the spreadsheet.
I am running WinNT and need to find the folder containing the default icons available for use on buttons in the toolbar window. I can copy the image but it saves as a picture (device independent bitmap). I want to be able to send the icon to other people so they can put it in their directory and choose to select it.
I have a folder "Macro" in the below location in my PC:
C:UserskkumarDesktopMy WorksMacro
There are 4 excel files in this folder: Sales.xls, Quantity.xls, Forecast.xls and Macro.xls. Macro.xls has 3 sheets: Sales, Quantity & Forecast.
I want a macro which will pull all data in: Sheet1 of Sales.xls to "Sales" sheet of Macro.xls Sheet1 of Quantity.xls to "Quantity" sheet of Macro.xls Sheet1 of Forecast.xls to "Forecast" sheet of Macro.xls
Also one additional requirement is if I copy the Macro folder to some other location in my PC the macro should still work.
I have a template for information that needs uploaded into a database via CSV. This database is then access via a HTML front end. As part of this there is a 'folder structure' with in the front end. This is displayed in a database table (See attached excel file for example data structure)
Currently I have this feeding into a drop down list which is somewhat cumbersome so want to make it more efficient and easier to use. I had toyed with the idea of adding more columns into the excel template and split the string up to populate however this isnt exactly professional looking.
My current thinking is, is there a way of putting this data into a listbox which is easy to navigate? Ideally in a folder tree navigation structure, I know this is possible for a windows folder structure
i want to use the "Browse for Folder" to select the folder where the files is in eg. E:My DocsGlobal and list the folder location and filenames to table (column I:J), and color them according to every folder location.
I would like the "Browse for Folder" windows to be able to select multiple files instead of just one file a time.
Sorry that I'm very new in Excel VBA coder. And, for this topic, I don't even know how to start. I want to make a MS Excel database of a numerous files. This database must be consist of Filename, Location, and it's attribute (let's say updated date, size, hidden status)
I have the below code that saves selected sheets of my workbook as pdfs in the current file location. What I would like this code to be able to do is to create a new folder (named with todays date), and then save each of the pdfs into this folder.
Code: Sub SaveWorksheetsAsPDFs() Dim sFile As String Dim sPath As String Dim fPath As String Dim wks As Worksheet
2. In addition to the original workbook being saved, a copy of the workbook with the current date is also saved to the specified location of my choice.
For example
"C:UsersUSER1DesktopBackup Test as of 02-10-14"
3. If a copy of the workbook is already saved with today's date, then overwrite it automatically without prompting the user.
4. All the above happens without any user interaction.
I have a folder "D:Documents and SettingsRakesh", which has many .xls files. Each file has a sheet called 'Cover Note'. I want to copy cells B2, C2, D4 and F3 from 'Cover Note' of each file.
These cells should be pasted in the current sheet, one row for each file. First cell of each row should have the source file name.
It would be better if macro can prompt to select the directory where ther source files resides.
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.
My request is similar to the points discussed in the above mentioned thread, but, it is a little bit different ..
Instead of inserting the picture to the worksheet, I want the picture to be copied from one folder on the HD to another folder called (Employees photos), which is located in workbook's path.
In other words, I need a code to copy one jpg picture from one location to another.
When I use Data, Advanced, Copy to another location the records that are copied are not unqiue to the Criteria range? If my criteria range is Cape it extracts records with Cape AND records with Cape Town. I only want to extract records with Cape?
I seem to be having an odd problem with Advanced Filter. When I use the Copy to Another Location option I get an error that:
"The extract range has an illegal or missing field name".
As far as I can tell, there are no blank or missing fields. I did originally have a DATE field but I have renamed this in case it was a "reserved" name but still have the problem.
When I used the filter in place it works correctly.
I am trying to use Advance Filter as opposed to lots of looping, copying and pasting and this is the only snag. I suppose that I could filter in place then copy/paste the results to the other sheet but I'd like to see where I may be going wrong.
I'm using a worksheet as a surveying program. I need to be able to enter a cell reference in my "input cell", ie "=A11". Then in cell the the right of the input cell I need "=B11" to be entered. And in the cell to the right of that, I need "=C11", and to the right of the I need "=I11". I can get so far working with one cell at a time.
If I enter "=A11" in T3, in T4 I can enter: =IF(T3=A11,B11,IF(T3=A12,B12,IF(T3=A13,B13..and so on. But 8 conditions is all I can enter before I get a message saying that the formula uses more levels of nesting than are allowed in the current file format. And I need to be able to enter at least 50 conditions in 3 adjacent cells.
I would appreciate some ones help to correct a macro I'm trying to write. The macro copies 3 columns from Sheet1 to Sheet2 in a selected location. The 3rd column copied needs to be pasted in a different column in Sheet2.
copy range of data from "sheet1" to sheets named A-Z i.e A,B,C,D,E..... in the same location as it was on sheet1 e.g. if on sheet1 data was in B1:C10. i want to copy this onto the sheets named from A to Z in the lacation.
I am trying to set up a file name and path in a cell, and then use this from a number of other cells but with a cell location added to it. So for example:
cell A1 contains a file name "c:mydirectoryexcelfile.xls"
cell A2 needs to contain the contents of the cell at location K12 (for example) from the file referred to in A1 cell A3 needs to contain the contents of the cell at location K13 (for example) from the file referred to in A1
This is to save having to put the filename and cell reference in all of the of cells. I would then do the same thing with another file in column B of this file and the same with column C etc.
what I need to do is , while an id value is constant copy 2 adjacent cells to a new location on the same row as the first occourance of the id value, then if the id is the same on the next row repeat the copy and add these 2 values to the cells next to the ones previously copied.
Once the Id value changes then the copy restarts on a new row which is the same as the first occourance as the new id value and repeats the same sequence as described in the first statement.
I have attached a sample spreadsheet showing an example of the source and how I would like it to end up, the colour is only there to seperate the outcome from the source and is not required in the code.
I am trying to develop a spreadsheet that will calculate a cost based on a matrix. I am attaching a sample of the calculation created so far. The end result is in cell M13 and is highlighted in yellow. I kind of layed the formula out in a few different cells, so hopefully it would be easy to follow.
simplify this process with maybe another formula that I might not be aware of, or maybe show me how to get this done in VB code. I think VB code would be the correct way to go just not sure.
I have a folder which contains multiple 'Customer' workbooks (example attachment 'Customer_001'). Each workbook has a filename unique to the customer (Customer_001, Customer_002, Customer_117 etc). The workbooks contain a single sheet with customer information and answers to questions. These 'Customer' workbooks are automatically saved into a folder once the customer completes a Userform and clicks 'save'. Potentially, there could be 100's of customers' workbooks saved in the folder, each with their own unique filename.
I also have a 'Master' sheet saved in a different folder (example attachment 'Master'). The 'Master' workbook has multiple sheets named 'Department 1' and 'Department 2'. The purpose of the master sheet is to consolidate all information from the individual customers' workbooks.
Specifically, I would like a command button on the 'Master' workbook to execute the following tasks...
1. Copy the data from range A3:F3 from each of the 'Customer' workbooks held in the folder. 2. Paste the data into the next blank row on the 'Department 1' sheet in the 'Master' workbook.
3. Copy the data from range A7:F7 from each of the 'Customer' workbooks held in the folder. 4. Paste the data into the next blank row on the 'Department 2' sheet in the 'Master' workbook.
5. Save the 'Master' workbook. 6. Delete all 'Customer' workbooks in the folder.
Have a slightly unique issue that I can't seem to find the specific solution for. I am wanting to filter a range, using row 1, then copy the visible cells (Excluding the title row 1) and paste into the same location, so over the data as Values.
I can do the filtering part and the selection of the visible row. Only trouble is pasting it to the same location.
this is the code so far - anything better would be great
Sub Macro2() Sheets("GF_Scoring Database").Activate Dim extvalue As String Dim rng As Range