I'm looking to create a macro that launches a dialog box upon file launch. Based on the input, I want excel to only show the tab which corresponds to the dialog box entry.
For example, if it asks "What is your name?" on file launch and I respond "Alex"; i want the tab labeled "Alex" to only be shown for the user.
Back in IE8, when you tried to download a file, it'd pop up a little box asking if you wanted to download or save the file. Macros in Excel could work through it using code like 'hWnd = FindWindow("#32770", "File Download")' to get the box and interact with it.
IE11 now has an obnoxious little ribbon that appears at the bottom of the window instead of the box, so FindWindow comes up blank.
There are a number of files including .xls, xlsx, and .csv, and there isn't a static link directly to the files, so I can't just put the link in workbooks.open. Also, to get some of the files, there are logins and forms to fill in with dates and the like. I can get through all of that stuff and click the button to download, but it's that open/close button that's stumped me.
Any way to get an Excel macro to interact with that Open/Save ribbon in IE11?
programPath = "C:Program FilesInternet Exploreriexplore.exe" ' works 'programPath = "iexplore.exe" ' does not work Shell programPath + " " + fileToLaunch, vbNormalFocus
but the drawback is that the invoked program (iexplore.exe, at least in my case) needs to have the FULL PATH to where the program exists = the "C:Program FilesInternet Explorer" which may or may not work on someone elses computer. This hardcoding will not work and is not transportable.
Is there a trick to find where the executing program lives? or launching it without the path?
I want to know if it is possible to launch a blank notepad from an existing excel spreadsheet and then type relevant "history notes" into notepad and save.
I am creating a manual spreadsheet for the company I am working for which is being used for Maintenance Planning / Scheduling and creating of work orders. Once the work order has been raised and the job has been completed it then needs to be closed out on the spreadsheet and any relevant notes entered in. I am hoping to be able to have a link that opens notepad by the click of a button within the spreadsheet and it allows the user to record any notes against that work order and save. These notes can then viewed by future users.
Consider this procedure to execute a MS Word mailmerge from within Excel:
Code: Option Explicit Dim objword As Object Dim odoc As Object Dim odoc2 As Object Dim wdsendtonewdocument As Object Dim mypath As String
Sub merge()
[Code] ........
The application hangs on the line in red. The file name (worksheets("Frontpage").Range("B15")) exists. It hangs with periodic dialogues "Microsoft Office is waiting for another application to complete an OLE action."
I end up having to go into task manager to close the word application before I can regain Excel control again.
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).
I want to launch userform A when the user hits the command button on userform B, I already have a macro set up to launch UserForm A and tried adding it to the code but it doesn't work.
I have a list of web address in column A. All of the web address belong to the same site and are different products at the store. I want to be able to some how launch the sites and have Excel copy the text string which follows the word "PRICE:" on the site back into Excel into the corresponding cell of column B.
I am looking for code that when cmdfile is click, it will open up the 'open file' dialog box, and go to a specified directory on the pc, and list ALL files in that folder, but not open it. I want the user to select the file manually.
I found the following code on the forums, but don't know if it is relavent in my case
Const myDir As String = "C:NAVIGATIONPERSONAL ussNLN"
I want to be able to have the Save As dialog box come up, but with a File Name already chosen, so that the user can save it as this File Name in any location he/she wishes. I can get the Save As dialog box coming up with my code, but I don't know how to automatically enter the File Name
I am running a macro on startup from a template that opens the File Save As dialog box to allow the user to select a folder and filename and save it before continuing.
I would like it to default to the Q: drive, it defaults to where the template was opened from.
I used
Application.Dialogs(xlDialogSaveAs).Show
to open the dialog, I tried using "Q:" as an argument but it doesn't seem to work. if I try
I have the below code to have the user select a pile path and save. what can I add to have the dialog box preselect the file type to macro enabled? the .xlsm extension is not doing it.
['save it under a new name
Dim fPth As Object Set fPth = Application.FileDialog(msoFileDialogSaveAs) With fPth .InitialFileName = Worksheets("Project Setup").Range("f19").Text & "_ROM Estimate.xlsm" .Title = "Save your File:" .InitialView = msoFileDialogViewList .Show End With]
The file I am trying to view is saved as follows: C: Test.gif
What I have done.Added a image control to a dialog box, called image1 Added the following event handler to image1: x = c: test.gif Image1.picture = loadpicture (X)Pressed F5 to test the code and brings up a dialog box with a blank image box.
Not called the userform in the main module (didn't seem much point considering the test failed)
My questions
where I am going wrong with this, the correct code?
Also in inputting the address of the file I could not use the C: format as this brought up an error. What is the correct format?
complete the attached code (Excel VBA) to automatically process a File Download dialog from Internet Explorer. I want to click "Save" which will produce the "Save As" dialog. Then I need to enter a default filename like (C:Temp) and click "Save" again. When this is working, I will hide Internet Explorer to make the operation completely transparent to the user. The URL is a sample chosen specifically for this test case.
Public Sub Report_Test()
Dim objIE As SHDocVw.InternetExplorer Dim strURL As String Dim varItem As Variant
' Establish connection to the Internet Explorer application. Set objIE = CreateObject("InternetExplorer.Application")
' Set Internet Explorer visible. objIE.Visible = True
I am trying to white a macro that takes a file path from a cell value and opens that file. When there is no file path in the cell, it prompts a dialog box. This part is pretty much working. However, I would like the file path selected from the dialog box to be added to the cell in the original workbook.
Sub Reports() Dim path1 As String path1 = Range("B20").Value On Error Resume Next 'checks if there is already a file path' Workbooks.Open filename:= _ path1, Updatelinks:=1 'if no file path then opens dialog box' If Error.Number <> 0 Then Application.Dialogs(xlDialogOpen).Show Arg1:="*.*"
Is there a way to use the open dialog box (like as if you where opening another workbook) and then with the selected item inster the path and file name into a cell.
I am using the following code to allow the user to select files to open. I have realised that you can create multiple filters with the msoFileDialogFilePicker command, which is very useful, since the program initalliy takes multiple text files, loads them into a workbook as seperate sheets and then saves the workbook as an excel file. Therefore I would like the user to be able to select the text files to load but also to be able to check if the corresponding excel file already exists and if so to be able to directly open this rather than have to create a new file from the text files. Therefore my question is: Is there a way to be able to tell which filter was in use when the file was selected?
Set fd = Application.FileDialog(msoFileDialogFilePicker) With fd .AllowMultiSelect = True .Filters.Clear .Filters.Add "Excel Files", "*.xls" .Filters.Add "Text Files", "*.txt" .Show ' olWin.Activate A = 1 ...........
To have other users open a workbook on the network without having to click button to open it as read only.
I have been trying to get rid of the "File In Use" message for the other users since they only need a read only copy. I am the only one who needs to know if it is in use because I will make changes to the workbook tools and have to save them.
I have set the Save As preferences so that it requires a password for modification and checked the read only checkbox. But that dialog box is popping up for the users. I am trying to eliminate any file in use dialog box for users other than myself.
Here is my workbook open procedure...
Private Sub Workbook_open()
Dim wBook As Workbook Dim UsrName As String
UsrName = Environ("username") On Error Resume Next Set wBook = Workbooks("Excel_Tools.xls")
I have created a macro in excel 2010 which enable the file to save (extract) data into separate location and name. The vba code for macro is as follows: Question: How can I save this workbook with reference to the value containing in cell B2? (it is named temporary now - as defined in the code)
I have some code in a standard module. When I try to run it, it does not appear in the dialog box. The code's below.
Code: Sub CopyCat(ByVal Target As Excel.Range) If Target.Column 21 Then Exit Sub If Target.Value = "Y" Then Cells(Target.Row, "A").Copy Destination:=Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1) Cells(Target.Row, "B").Copy Destination:=Sheets("Sheet2").Range("B" & Rows.Count).End(xlUp).Offset(1) Cells(Target.Row, "C").Copy Destination:=Sheets("Sheet2").Range("C" & Rows.Count).End(xlUp).Offset(1) Cells(Target.Row, "D").Copy Destination:=Sheets("Sheet2").Range("D" & Rows.Count).End(xlUp).Offset(1) Cells(Target.Row, "E").Copy Destination:=Sheets("Sheet2").Range("E" & Rows.Count).End(xlUp).Offset(1) End If End Sub
I am very sure that I have deleted all my macro in my excel spreadsheet and saved. However, when I tried to open the file, the macro dialog prompt me again..... I have press alt F11 and confirmed that there is no macro.
Is there anyway to increase the size of dialog boxes in excel? I am vision impaired, when I go to "format cell" I have a problem reading it. If I could increase the font size, wouild make mt life easier.
Is it possible to disable Import Data Dialog box in Excel 2010? I have a web query file. I want to copy its content and paste in a new worksheet under an existing workbook. I have a macro which does that but I get Import Data dialog box when I tried to paste the copied content from test.iqy file to new sheet. The dialog box has
Select how you want to view this data in your workbook? By default Table is selected, which is fine.
Where do you want to put the data? By default New workbook is selected. I want to have Existing worksheet selected by default.
Is there a way to set these requirements into vba code and make this dialog box not appear at all?