Sub Openfile() Dim wkbOne as Workbook Set wkbOne = Application.Workbooks.Open(Filename:=Worksheets("Sheet1").Range("A1") & Worksheets("Sheet1").Range("B1") 'where "A1" is the path where the file located and "B1" is the file name.' End Sub
When I run this it will work, but if I change to below it won't open all file in range, what's wrong with this?
Sub Openfile() Dim wkbOne as Workbook Set wkbOne = Application.Workbooks.Open(Filename:=Worksheets("Sheet1").Range("A1:A10") & Worksheets("Sheet1").Range("B1:B10") End Sub
In my search I found several example similar to what I need, but nothing I could adapt to filt my needs, (at least not wim my limited skills).
Here what I need to do:
I have multilple Excel files in a directory. (M:/Archived PO Responses/Domestic). On a daily basis, these files are processed via VBA, and deleted after processing. What I need to do is, prior to processing and deleting these files, create an ongoing log of the filenames in that directory.
The macro would open an Excel file named "Processed Orders.xls", which is stored on the network drive "M:". It would then append all of the filenames in the directory mentioned above to a sheet named "Processed Orders" in that workbook, below any filenames that already exist.
So I'm creating a grid worksheet for engineering calculations and I have a couple questions about the best way to do it. I've been messing with excel for my calcs for about a decade now, and I every once in a while I try and improve them.
First: I will have several input areas that will either be colored text or shaded background (either works for me). I don't want these 'input required' objects to print as color, just black. But I want my logo at the sheet top to print as color. I've only found ways to not print any color. Can I print the logo as color and the 'input required' stuff as black?
Second: When I do calcs by hand, I write them out on 10x10 grid paper. Each 10x10 grid is one inch. In the past I've created this grid out of the cells, which works. I frequently need to change formulas around though, and each time I do this, I end up needing to mess with the grid cells also. Is there a way to create the grid and have it in the background so it doesn't need to be adjusted each time I change formulas? I wan't the grids to print, and also want to see them on the screen, as I sometimes draw simple objects along with the formulas.
Is it possible to fill an embedded pdf (AcroPDF) fields with data from excel?
For example: I have an embedded pdf file, it has a field name "NAMEFIELD", on the click of a commandbutton, I would like Sheets("Sheet1").Range("A1").Value to be input into the PDF file text field "NAMEFIELD".
Using Excel 2010, I have a workbook containing a variable number of PDF files captured as embedded OLE Objects. I wish to save each of the embedded PDF files to disk and assign the filename based on the contents of column 1 of the row containing the OLE Object.
I have an Excel Workbook with Showcase Queries embedded into it.
Upon a manual open, the user is prompted to either refresh data or keep data since last save, the user then has to enter a username and password to allow the query to access the database.
Using the code below to open the workbook, no such prompts are given. Is the code overriding the prompts and automatically refreshing the data without password? [Given nature of data, visual validation of refresh is not possible]
If not, how can we code a data refresh through showcase query with user/pw req's?
I have a word docx embedded within my spreadsheet .
Both are on Office 2010 versions and I have named the embedded word doc
docx = CCPBlank (named range) sheet = Support Data
I want to open the word doc from within the spreadsheet from a user form I already have created for other module calls.
Any simple VBA code to open the embedded docx?
I have looked a previous posts and not sure they are suitable. I have embedded the docx as I want to ensure only that empty version is opened each time. It also means I only have to send one file (xlsm).
Working on a user form... I have a combo box, with a list of the items available.... then I have a text box that inputs the quantity. Is there a way that I can put a list underneath in such a way that every time I select a item, put the quantity in the text box, it will list down in that list?
In other words... If I have 5 products for the same order I would pick one, qty and click add, then another one, qty, and add... so on. That way I would be able to see all of the items that I have picked.
I have 2 excel workbooks - each containing one table.I have 1 Powerpoint Prtesentation with OLE Links to the 2 tables.
All I want is for any update in the excel tables to show in the running PP Presentation. The annoying part is when I set up the linked objects, everything works perfectly and any changes in the excel files update real time in the PP presentation.
As soon as I close the excel file and reopen though, from thereon in I have to update the links manually.
Things I have tried:
A PP Add in called "Update Links" which updated the OLE links on every rotaion of the show. This would be a fine workaround if it didn't stop the slideshow if/whenever someone was updating one of the source files with the "file is already open..." message...So set both source files to shared as PP will only be reading the data anyway. Still the error appears.Inserting some code into PP:
Sub linkupdate() Dim osld As Slide Dim oshp As Shape For Each osld In ActivePresentation.Slides For Each oshp In osld.Shapes If oshp.Type = msoLinkedOLEObject Then oshp.LinkFormat.Update Next oshp Next osld End Sub
All I want to do is update the links without stopping the slideshow. I have tried numerous PP approaches, but maybe there is an Excel solution that will update links automatically on each save.
I have a big macro that runs in everyone's PC except mine. Once I debug it, it shows that it stocked at copying the objects from a template sheet to another sheet. When I try doing it manually, I still can not copy the objects to another sheet. It copies the sheet but except the objects in it. Is it related to my settings?
Is it possible to use the HYPERLINK function inside of a validation list?
Presently I have a dynamically named range on another worksheet that includes a hyperlinked term. When I attempt to create a validation list using this named range the term appears in the list without the hyperlink.
I often use the .TAG property on controls as a sort of temporary container to hold variables, arrays and such but this gets messy because I sometimes forget which control I used for what since there appears to be only 1 tag property per control. Are there any controls that have numerous .TAG like properties I could use (even name) to hold my temp data?
As you can see in the attached file, I have a column of classes , a columns of related revenues and the total for each class. I have to create a column, next to these, where I can create the percentage with respect the sum of each class (as you can see by the formula). My problem is I am not able to say vba to find the totals and to create the percentage just with the revenues related to that total.
How can I view hidden characters inside an excel cell. I have an excel file that I receive from our vendors. After verifying the data, I save the file as a tab delimited .txt format. When I open the .txt file I see some data with " " at both ends. i.e. "800 North Ave. Suite A". The thing is I don't see the " " in excel. This tells me that these are non-printing characters.
What I have attached is spreadsheet I've built to quickly generate an army list for a tabletop game. Anyone can click on the Force Organization Slot (FOS) and choose the type of unit and from there, select the specific unit name attached to that FOS. Each individual unit has a list of options/upgrades currently attached to the sheet from cells AD through AX and the points cost listed next to each upgrade.
For example, when selecting the Rhino unit from the Dedicated_Transport FOS, there should be 4 drop down lists of selectable upgrades (Storm Bolter, Hunter-Killer Missile, Dozer Blade, and Extra Armor). Currently, I have only named the ranges for the Rhino and Razorback units in order to get this working properly without having to go through the entire list of units and change names/create ranges/ect.
What I'm aiming to do is to create an individual drop down list that is directly related to the Unit Name cell in order to populate a complete and selectable upgrade list for each unit. I have played around with some functions that work in the spreadsheet (see cells X10:X12) but do not work properly with Data Validation.
Oddly enough, when I enter this formula under Data Validation:
I have a from that work great in PC but if opened in a MAC, some of the functions will not work.
For example, There is one cell with Data validation that based on the value selected in another data validation cell, it should only display all possible options pertaining to value chosen. These are the values: a user select a customer based on customer name. The Data validation will the put the customer number in cell AF3. In another call with Data Validation I have this formula:
"=OFFSET(SHIPTO,MATCH(AF3,SHIPTOColumn,0)-1,2,COUNTIF(SHIPTOColumn,AF3),1)" SHIPTO is the Name range for the tabs called SHIPTO with "Shipto!$A$1" SHIPTOColumn is the Name Range for "SHIPTO!$A:$A" Column A is where the customer numbers are.
This work fine in a PC but not in the MAC using excel 2011