Multiple VBA Project Explorer
Jul 7, 2009
As of a few weeks ago the project explorer in VBA on my laptop has started retaining the information on all files/projects opened during the current Excel session so closing a file in Excel does not remove it from the VBA editor.
Furthermore if a file has been opened several times during an Excel session, it appears several times in the project explorer and editing the “dormant” versions does not impact the currently open copy of the file so the whole thing can get quite confusing and result in changes to not being saved.
View 9 Replies
ADVERTISEMENT
Dec 20, 2006
If from a macro I open "workbook A" from within "workbook B" then "workbook A’s" VBA project remains in memory and in the VBA project explorer. If I then run the macro again I have 2 instances of workbooks A VBA project showing, and so on. I read on this forum that if you have a public variable that links the workbooks then this is the reason but I have created a test workbook with the following code
Sub test()
Workbooks.Open ("C:Path Data.xls")
Workbooks("Path Data.xls").Close SaveChanges:=False
End Sub
If I run the macro test the workbook opens and then closes but its project remains open. How do I remove the projects when I close a workbook?
View 7 Replies
View Related
Dec 7, 2012
When selecting multiple excel files in explorer, you can right click and choose to print the selected documents. All documents gets opened and printed but the files stay open and you have to manually click on YES or NO to save the changes.
Is there a way not to see this window appear. So documents get opened and printed and closes itself without asking anything. Maybe it can be done with an option in the preferences. I'm not sure.
By the way the documents where created with excel vba just in case it's relevant. Also the version of Excel is an older version, I think it was Excel XP or 2002/2003.
View 1 Replies
View Related
Aug 4, 2014
I have a table of projects with 1) duration in year, 2) time window (number of years of our planning cycle), and 3) start year of the project. I want to generate a list of project parts of all projects where they may take place. This will serve as an input to an optimization program.
So a project of 2-year duration should have 2 parts over any year within the time window. I am including the "impossible" ones for my developer to tag them as "0" when we run it through his code.
View 5 Replies
View Related
Sep 5, 2013
My task is to consolidate 4 Excel Project Lists (Workbooks) to a Master Workbook. The Project Lists has a different structure and almost different content. The relevant information is always on Sheet1 but it has completely different ranges. The only constant is the Project Number, which should be used to sort the information. Every Project should be listed only once with all the existing information.
I found a code written by Ron de Bruin which has already some components that I want to have in my VBA but I think there are still a lot of necessary adjustments to do.
Code:
Sub MergeSelectedWorkbooks()
Dim SummarySheet As Worksheet
Dim FolderPath As String
Dim SelectedFiles() As Variant
Dim NRow As Long
Dim FileName As String
Dim NFile As Long
Dim WorkBk As Workbook
[code]....
The Master Project List should has the headers in Row1 and the information listed below. The Macro should automatically places the correct information to the correct column. Some of the information are in 2 or more of the lists but they should be listed only once in the Master List.
Project Number
Project Description
...
1111E.000000001
[code]....
I guess a problem is that the structures of the Lists are quite different so there must be a kind of sorting process.
In the end I want to have an Excel File with the Macro and a Command Button and by clicking the Macro creates a new Workbook with the Master List.
It would be better if there is a variable range instead of a defined. Like the Macro searches the last row and starts at this row and column.
View 4 Replies
View Related
Jul 30, 2013
I am trying to get excel to open a MS Project file and then run a project macro on it.
What is happen is that when I run my code it works, and then excels VBA window freezes up and the run arrow goes away, and if I try to open project I just get a chiming noise and it won't open.
For now I have to select the MS Project file from a directory, but in the future I would like it to go through the folder and open all of the file in the folder
EXCEL CODE
Sub ImportMSProject()
Dim FileToOpen
Dim mpApp As MSProject.Application
Dim prjmacro As Object
'Identify the File to Open - START
FileToOpen = Application.GetOpenFilename("Microsoft Project Files (*.mpp), *.mpp")
If FileToOpen = False Then
Exit Sub
End If
'Identify the File to Open - END
[code].....
View 9 Replies
View Related
Apr 27, 2007
I have tried to record macro to protect VBAProject / lock project for viewing. But can not success by that way.
View 9 Replies
View Related
Aug 28, 2007
I need to write a couple of functions. Firstly I want to do a count on column B (project $) depending on the criteria on column A (project description). For example a total count of all values in col B if project description is "P" or "A". [I can do sumif functions but this is a countif and I cannot get this right].
View 4 Replies
View Related
Jul 18, 2008
I was wondering if it is possible to use a macro open a folder in Windows Explorer. Previously someone on this forum taught me how to open an Excel file from a macro, but in this case there will be a new file every week. As the files will all be stored in the same folder, I thought it would be easier to open the folder in the normal Explorer view and select the file manually than to change the macro every week.
I am using Windows XP and Excel 2003. My programmes are run from the C drive, but my documents are stored on the E drive. What I am looking for really is a line that says: open in Explorer E:data
ewprocessed.
View 12 Replies
View Related
Nov 9, 2008
I want to write a piece of code to go to some webpage(URL in some excel cell) and then copy all the text on the page and paste to some other cell in the same worksheet.
I know I can open IE using VBA(Excel 2003),but is it possible to get everything on the IE window into the clipboard and then paste into any of the excel cells?
View 2 Replies
View Related
May 20, 2009
I have the following in a macro ...
View 6 Replies
View Related
Feb 27, 2013
I want to automate few steps,
Step 1 : click on button in Internet explorer1(IE1) which inturn opens Internet explorer2(IE2).
Step 2 : in IE2 i want to enter some value in textbox and click in "go" button.
Managed to get step 1 some how, need to proceed futher with step 2 given above
Private Sub IE_Autiomation()
Dim i As Long
Dim IE As Object
Dim objElement As Object
Dim objCollection As Object
Set IE = CreateObject("InternetExplorer.Application")
[Code] .........
View 4 Replies
View Related
Aug 3, 2013
I am trying to automate a website which I use for daily office related work. I am navigating the website, selecting some options and clicking on download button using vba code. When I click on download it opens a new internet page. Now I have to click one more hyperlink on that newly opened internet page. How to do that?
View 1 Replies
View Related
Apr 30, 2008
I am trying to use Excel VBA to conduct a transaction automatically.So far,I managed to get all the required input in.Now,I need to click the "Submit" Button.
I was thinking of using the InternetExlorer.Document.Links(x).Title to search for the link of the "Submit" button and then use the .Navigate method to proceed to the link.
But when I wrote and ran the :
InternetExlorer.Document.Links(x).Title
i get the following mesage:
"Run Time Error 98
A property or method cannot include a reference to a private object ,either as an argument or as a return value "
View 9 Replies
View Related
Dec 11, 2008
I have a macro that opens a web page, copies data from the page, then paste the data into a worksheet in excel. All that works just fine. however I cannot figure out how to close the connection to the web after I copy the data
View 5 Replies
View Related
Jul 19, 2006
If Excel VBA can let Internet Explorer quit if it have been running when you open excel workbook?
View 9 Replies
View Related
May 31, 2007
I am trying to write VBA code which will go to a web site, SelectAll, make a Copy and then close the IE connection. In my code, Set objIE = CreateObject("InternetExplorer.Application") works, objIE.Navigate "https://www.whatever.com" works, and objIE.Visible = True works. What's the objIE code for "Select All" and "Copy" ? I can't seem to find any reference to these commands in the posts anywhere.
View 9 Replies
View Related
Jun 1, 2007
im working on a project that has exposed myself to something. I am familiar with navigating through many IE websites in VBA, but this one has me stumped. I have entered all my information via code, and now I need to progress to the next screen. Here is the button I need to click.
<button name="btnRunSearch" accesskey="R"
class="actionButtonBold"
onclick="CSWCSC_runSearch(this.form)" onkeypress="return CSWCSC_submitenter(this, event)"><U>R</U>un Search</button>
View 9 Replies
View Related
Nov 19, 2009
The following 3 macros do the following.
1st macro . . . When the button is clicked for this macro, Windows Explorer is opened and the folder MyMenuFiles is selected. Works Fine.
2nd macro . . . When this button is clicked, the windows explorer opens with My Documents selected. Works Fine.
3rd macro . . . THIS IS THE PROBLEM ONE. When this button is clicked, windows explorer opens, with the C: drive selected. I want My Computer selected.
View 3 Replies
View Related
Dec 14, 2009
I am not sure if this can be done but I couldn't find it in the forum. I need a macro which will open a web page and on that page fill a search box with a value from cell A2 and click the search button. The macro I have now opens the webpage. I need the rest. The search box is like the one on google homepage, I mean when the webpage is opened, the cursor is automatically inside the search box.
View 3 Replies
View Related
May 23, 2012
Can we get a macro in excel where we can browse web page and get the data from a internet based webpage.
View 3 Replies
View Related
Nov 14, 2013
Every day I gotta enter information in my work's website (intranet), however I dont know that much about manipulate with VBA the Internet Explorer application, for example once I enter information in the website, I gotta enter an ID after that I gotta select the date, then I gotta give some clicks in some checkboxes, then I copy some information from excel and enter that information in the navigator, and finally click on save. The thing is that I do not have access to that website in my home so is impossible for me to provide you with the link... what kind of codes do I need to do it, or where can I find a manual where I can learn to manipulate another application like the Internet explorer with VBA.
View 4 Replies
View Related
Feb 11, 2014
I have some problems with VBA. So the problem is that there is this page Page (if you want to get to this page with the program you have to write "Krateris" into the msgbox) and I want that the program would click the link in the first result or selected result
So this code is working just I need to expand it to get the result which I wrote above. I am writing this code in module not in worksheet.
Code:
Sub test()
Dim btnInput As Object
Dim IE As InternetExplorer
Set IE = CreateObject("InternetExplorer.Application")
company = InputBox("write company name")
[Code] .....
View 6 Replies
View Related
Mar 22, 2007
Does anyone know the command in VBA to print the current Internet Explorer page? I was exporting it to Excel to print, but I could save time if there is a command to activate the print button.
View 9 Replies
View Related
Apr 5, 2007
I'm sure this is really easy, but I'm learning and not having luck in the search option for previous posts. Thanks for your patience in advance.
I want to open a windows explorer window by using a button in Excel.
View 9 Replies
View Related
Jun 2, 2009
I have a VBA project that navigates to a website and then clicks on a link. When I click the link in my code a new IE Browser opens with a form that I wan to fill out. I know how to update the form, but I don't know how to reference the new browser window that was opened when I clicked on the link.
'Open End User Multiple Selection
Set tags = myIE.document.getElementsByTagName("A")
For Each tag In tags
If InStr(1, tag, "'multiple_selections.htm','EndUser'", vbTextCompare) > 0 Then
tag.Click
Exit For
End If
Next
when I try to reference the document in the popup window, it is still referencing the previous window. How can I set my "myIE" object to reference the new pop up window?
View 9 Replies
View Related
Nov 27, 2006
I have been searching for ages for a solution/reason to this problem. Either i am using the wrong search terms or the information is not out there. I have created an intranet type series of pages for the laboratory i work in. These pages contain information on current orders, chemical lists, stock lists etc. The vast majority of these lists are kept as excel spreadsheets.
The problem i am having is that when you open one of these sheets in internet explorer you can not always have acces to all the menus (format, data, insert etc). All you can get is file, goto, favorites and help. Sometimes you have full access to all the menus and other times you do not. Originally i thought this was due to a copy of the file being open on another computer already but this does not seem to be the case.
View 9 Replies
View Related
Feb 7, 2007
I want to create a macro to open a webpage, and with that webpage fill out the fields on the webpage and then hit enter and move to next record. I am having great difficulties with establishing Internet Explorer as my object and maneuvering around inside of it. My data would being in column A so i would expect to use the string below when referencing my data.
Do Until Workbooks(2).Worksheets(1). Range("A" & row) = ""
View 9 Replies
View Related
Jul 7, 2007
how to launch windows explorer from a path that resides in a cell using the code below.
Sub LaunchWindowsExplorer()
Dim PID As Double
Dim strRootPath As String
Const strExpExe = "explorer.exe"
Const strArg = " " '" /e,/root, "
'// Change rootpath here
strRootPath = "J:MyDirectoryWilliams,Bob 7264"
PID = Shell(strExpExe & strArg & strRootPath, 1)
End Sub
The problem I have is that once I have done this a number of times (probably somewhere between 80-100 times then I notice windows explorer starts to play up as if running out of memory. A reboot soon fixes that, however, I was wondering if there is anything I can add to the code to keep it from hogging up memory...if that is even possible.
When I say 80 - 100 times, I don't mean opening up 80 - 100 instances of windows explorer. I mean launching windows explorer, moving some files then closing that instance of windows explorer. Then coming back into excel and repeating that process.
View 9 Replies
View Related
Jul 10, 2009
When I add hyperlinks into excel the picture shows up by using internet explorer when I want it to use windows picture and fax viewer.
How do I change it to open in windows picture and fax viewer???
I use Windows XP professional and Excel 2003 SP3
View 8 Replies
View Related