I need to activsheet create in .pdf witch i did with this
VB: Sub Save_As() ' macro za snimanje racuna u PDF pomocu Microsoftovog ugradjenog alata za Office 2010 Dim txtName As String txtName = "D: eports" & Range("G14") & "_" & Range("L3") & "_" & Range("E18") 'ime nove datoteke i folder u koji se snima ActiveSheet.ExportAsFixedFormat _ Type:=xlTypePDF, _ filename:=txtName, _ OpenAfterPublish:=False End Sub
and for that pdf file i need to create folder based on cell e.g. q1 and sub folder l3 and all that in case that they dont exist and if they are just put file in it. For example i fill out sheet (one of many in one day) and i click buton and sheet go to pdf in subfolder L3 in folder Q3.
This Macro (Located within "SWMS Auto-Fill.xlsm) scans the folder its in and transfers information into select cells within each .xlsm file it finds. However I need to move the SWMS Auto-Fill.xlsm file to the parent directory.
So I need it to scan: Workbook DirectorySection4
Code is below:
VB: Sub Autofill_SWMSs() Dim MyPath As String Dim MyFile As String Dim Wkb As Workbook Dim Cnt As Long
The code below is sending back an error. It's supposed to create a folder and a subfolder within it and if the folder already exists then a msg box should pop up saying that folder already exists.
The issue is the I want to put the condition here in my the code that only copies the desired cells if the sheet is named specifically such as "Jan", if not named as this the worksheet should not be used. The current code I am using was posted on this site in 2009: VBA to copy specified cells from all the files in a folder
My modified code is:
Option Explicit Public strSourceFldr As String Public EachFile As Object Public objFSO As Object Public objFolder As Object Public objFile As Object Public strSheetName As String
I have a need to open a file from my companies intranet. My current method was to open said file via the method that the recorder gave me. However, I would like ot be able to open a said file without having to start open another workbook.
This is the path: [url]
So the command is this: Workbooks.Open [url]
Links are not actual links
So what I need to know. Is how can I open this file without opening a workbook. I haven't been able to use the VB "Open Statement" to open a file and I don't believe that I've been successfull using the Filesystem object either.
Dim IntApp As Object Set IntApp = CreateObject("Internet.Application") With IntApp ' Change file name to suit .Documents.Open Filename:="http://web addr/" .ActiveDocument.Select .Selection.Copy End With
I am using the following to code with a warning message. However this warning message appears each time the macro is run? Can this be modified in such a manner so that it will show the warning message only once for first time it is run on each opening of WB?
Sub mln() Dim a a = MsgBox("Please note that this will replace formulae with value.So you are requested to run this on a copy of the file.", vbYesNo + vbExclamation, "Important") If a = vbYes Then For Each c In Selection
c.Value = Application.WorksheetFunction.Round(c / 1000000, 2) Next c End If
i've been working on VBA for a file that i'll be sending out to a bunch of people. There are three questions that i want answered after the file is opened...not allowing them to proceed until they enter data.
1. Please enter Management Unit. 2. Please enter GL Account. (US only) 3. Please enter Earnings Code. (Non US employees)
The first question MUST be answered with a 6 digit number. The 2nd and 3rd may or may not be answered. simply hitting is acceptable.
After that i would like the answered populated in 3 rows below the lastrow in column B. thus, if there is data in B50, then answer 1 in B53, answer 2 in B54, and answer 3 in B55.
And if "MU:" could proceed the answer to 1, "GL:" before answer 2, and "EC:" before answer 3.
i have a macro that performs the same search in many websites, opening a new ie window for any site. What i want now is opening a new tab in IE instead of a new window. To illustrate, here go some code:
VB: Dim PartNo As String 'Declaro la cadena de texto que determina la busqueda Public Sub BuscarPLCCenter() Dim IE As InternetExplorer
[Code]....
I would like that all of these procedures opened a new IE tab to do the search, cause actually it opens like 15 windows at a time and is not user friendly enough.
I have just added some code to make my workbook close after it has been inactive for 5 minutes...this works fine except it opens itself up again after 5 minutes. If I select 'Enable Macros' it closes immediately and if not, it will stay open.
Here is all of the code I put in for the auto shut down:
I currently have a workbook that, when opened, automatically kicks off a macro (with a call from the Workbook_Open event in ThisWorkbook). I was to run that same called macro from a custom button that I put on a toolbar in Excel itself...which is pretty straight forward. However, when I do this, the macro kicks off twice...once from the button and once because the called macro's workbook opens and kicks off the macro with the Workbook_Open event.
So, what I was thinking was...is there a way to tell if a workbook is being opened by another workbook (by calling it's macro) or whether is was opened "normally (manually)"?
I have about 20 plus workbooks in a folder. Each has 52 sheets, Fridays date, that I want to copy all the data from each sheet.
Is there a way to open all workbooks in a folder and copy all data from on all the various sheets into a single workbook?
I'm trying to gather the info and make a small data base from the various books. I'd like not to have to call each workbook by name as the file names change or get added to.
I have a spreadsheet that I need to open two other workbooks to copy and paste data from.
The name of the two workbooks changes each day, and the location because they are filed in subfolders.
I have the following code, which works to open the first sheet but then comes up with the following error when trying to open the second sheet. "Run-time error '1004: Excel cannot access 'Hub PVA'. The document may be read only or encrypted".
The folder is not encrypted because when I was only opening the second document with the same code, it worked.
The code I am using is: 'DECLARATION On Error GoTo ERR1: ChDir "G:GENERALTRANSPORTDAILYPLANS" Workbooks.Open Filename:="G:GENERALTRANSPORTDAILYPLANS"
ive created a spreedsheet for work calculating money etc from different tills. is there a way i can have a box appear when the spreadsheet is opened asking for particular information to be entered.
I am trying to do something simple but not quite sure how to do it. I am using the GetImportFileName and then selecting information of one sheet from that file and copying to another workbook. I need to know how to then get back to the file I have opened to search the next sheet and so on. The problem I have is with this line.
Workbooks(FileName).Activate
Sub GetImportFileName() Dim Finfo As String Dim FilterIndex As Integer Dim Title As String Dim FileName As Variant
' Set up list of file filters Finfo = "All Files (*.*),*.*"
' Display *.* by default FilterIndex = 5
' Set the dialog box caption Title = "Select a file to Import"
' Get the Filename FileName = Application.GetOpenFilename(Finfo, FilterIndex, Title)
I am trying to view a csv file that has string data, some of them like '395E02'. Excel automatically converts this string into an exponential number. Is there any way to stop Excel from performing the conversion so I can read the number as is?
In a desperate attempt to find a solution, I thought I would try what seems to be a very good and helpful forum filled with loads of expertise (yes I'm creaping here). Out current mainframe systems churns out *.DOC reports for various managers all the time. I am trying to extract the data from these *.DOC files to a meaningful Excel spreadsheet. The first hurdle is killing me and I know that once I get past it I will be heading for the finish line. The email that comes to the inbox has the same title each time. I would like to open the *.doc file in excel, do my calculations and then move the email message to another email folder ready for deleting.
My friend emailed me a workbook. When she or I open the workbook, it opens two instances of it. Is there an option in excel that is causing it to do this? I need to send this a client and I do not want this to happen on their side.
I have a UserForm (UserForm61) where I have a popup calender acts like DTPicker. and some other controls . My Problem is whenever I am trying to open the calender it is opening behind every control. changing the z order played no role.
I have a workbook that consists of 3 sheets, it's a template I use. Once I am done filling out sheet 3, I save as a new workbook. When I have to go back to the template workbook it always opens on sheet 3. Is there anyway that once I open the template workbook it will open on sheet 1?
Last monday I clicked on my quick launch icon for my time card, which is in excel. It opened up, but I got an error message saying that excel had an error, send report or don't send report. Closed everthing out and clicked on the icon again, but this time excel oppend but the file did not. I get just a blank (don't know what to call it) spreadsheet. There are no cells to enter anything in. I do get the "File, Edit, View, and so on" at the top. I can click on File than Open and browes for the file and open it that way, but I can't open any Excel file by double clicking it in explorer.
since my pc has updated to ie7 all pictures that I open via hyperlinks from excel now open in and internet explorer window instead of windows picture & fax viewer as JPEG's are set to.
If I open the JPEG files directly they open with the correct program.
I'm sure it must be a setting somewhere but I cant find it.
PFA my inventory managment sheet. In transections sheet i am entering my stock in and out details. I want to generate monthly statement for particular item. I am able to get issue and receipts but not able to get opening stock on the particular day.