Create Internet Explorer As Object
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 Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Internet Explorer Object AND Pop Up Window
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 Replies!
View Related
Internet Explorer Object Not Assessable After Navigate
I have used VBA in Excel to open IE, browse, capture web pages, etc. for several years. Now with Vista, IE 7, and Excel 2007 they no longer work. The createobject does create an IE window, but when using the .navigate method it opens a secondary window. The IE object is no longer accessible after the navigate is executed. Example: Sub GetKBArticles() Dim IE As Object Dim sURL As String Dim i As Integer IE = CreateObject("InternetExplorer.Application") IE.Visible = True
View Replies!
View Related
Automating With Internet Explorer
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 Replies!
View Related
Internet Explorer Select All
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 Replies!
View Related
Internet Explorer Buttons
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 Replies!
View Related
Closing Internet Explorer
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 Replies!
View Related
Interaction With Internet Explorer Using VBA
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 Replies!
View Related
Conduct A Search With Internet Explorer..
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 Replies!
View Related
Menus Not Available Opening In Internet Explorer
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 Replies!
View Related
Create Object, Work With Workbook
I'm trying to open a file and perform various tasks. This is the structure: Dim xlApp As Object Dim xlWb As Object Set xlApp = CreateObject("Excel.Application") xlApp.Visible = True Set xlWb = xlApp.Workbooks.Open(BackupFile) ' backupfile evaluates to c: esting est.xls xlWb.Worksheets(1).Activate Debug.Print xlWb.Worksheets.Count Dim ws As Worksheet For Each ws In xlWb.Worksheets Debug.Print ws.Name ws.Activate Next ws I think I'm totally missing something. The above works, except for the loop. None of the names show up in my immediate window, and none of the worksheets are activated. xlWB evaluates to nothing, which is where the problem has to be...but why would my first .Activate and Debug.Print lines work? Also, If I declare xlWb as Workbook then absolutely nothing works after the file is opened. Basically what I want to do is open the file, do a bunch of a stuff with it, then save and close it. I have this all working without creating another object, but the opening of the file is still visible to the user. Seems like turning off ScreenUpdating doesn't truly work.
View Replies!
View Related
ActiveX Control Can't Create Object
I copied a routine from this forum that would email a single sheet from a 10-sheet workbook to a recipient. This worked great for a long time, then all of a sudden I started getting the "ActiveX control can't create object" error. Here is my
View Replies!
View Related
Error # 429 Active X Can't Create The Object
I am having trouble with the following code... I get error # 429 Active X can't create the object... Dim blnIOpened As Boolean Err.Number = 0 On Error GoTo failed blnIOpened = False Set MyXL = GetObject(, Excel.Application) failed: If Err.Number = 429 Then Set MyXL = CreateObject(Excel.Application) blnIOpened = True End If If Err.Number 429 Then MsgBox Err.Number End If
View Replies!
View Related
Create Range Object & Pass To A Subroutine
Create Range Object & Pass To A Subroutine Sub Test(ByRef objRange As Range) objRange.Value = "Hi" End Sub Sub TestTheTestMethod() With ThisWorkbook. Sheets("Sheet1") Set objRange = .Range(.Cells(1, 1), .Cells(i - 1, 3)) objRange.Value = "Hi" 'This works fine ! Test (objRange) 'But here... Getting ERROR 424 -- Object Required End With End Sub
View Replies!
View Related
Create Macro To Chart Data With Location As Object In Active Sheet
I have been trying to create a macro in excel to chart a selection of data and to output the chart on the active sheet where the data was taken (as opposed to a named sheet). So basically, I have about 300 worksheets with data, and I would like to have a button on each page that automatically charts that data when clicked, and outputs the chart to the page where the macro was clicked. However, I have not been able to figure out a relative reference that will allow me to make the LocationasObject reference simply the ActiveSheet as opposed to a specifically named sheet. See my code below, which references an output to a worksheet called "Charts". Right now, all of my charts are outputting to the sheet called "Charts", as opposed to the active sheet. Sub ConsDiscChart() ActiveCell.Offset(29, 11).Range("A1").Select Selection.End(xlToLeft).Select Selection.End(xlToLeft).Select Selection.End(xlToLeft).Select Selection.End(xlToLeft).Select Selection.End(xlToLeft).Select Selection.End(xlToLeft).Select Selection.End(xlUp).Select Selection.End(xlUp).Select Selection.End(xlUp).Select Selection.End(xlUp).Select Selection.End(xlUp).Select Selection.End(xlUp).Select Selection.End(xlDown).Select ActiveCell.Offset(0, 1).Range("A1:B1").Select Range(Selection, Selection.End(xlDown)).Select ActiveCell.Offset(0, -1).Range("A1:C24").Select Charts.Add ActiveChart.ChartType = xlLineMarkers ActiveChart.Location Where:=xlLocationAsObject, Name:="Charts" With ActiveChart .HasTitle = False .Axes(xlCategory, xlPrimary).HasTitle = False .Axes(xlValue, xlPrimary).HasTitle = False End With End Sub
View Replies!
View Related
Error - Number:429:' GetObject. ActiveX Component Can't Create Object
VBScript code snippet below is being used in an ASP page but the call to GetObject never attaches to a running instance of Excel. Since visible property is set to True, I can see the instances accumulate in the TaskBar each time the ASP page is called, so there are obviously instances to attach to. Dim excelApp Set excelApp = Server.GetObject(,"Excel.Application") If (err <> 0) Then Set excelApp = Server.CreateObject("Excel.Application") End If excelApp.UserControl = True excelApp.Visible = True excelApp = Nothing GetObject errors out with the following error: Error - Number:429 Source:Microsoft VBScript runtime error Description:ActiveX component can't create object
View Replies!
View Related
Vba Error Run-time 429 Activex Component Can't Create Object - Excel & Outlook 2007
I have some VBA code that in one portion of it an Outlook e-mail is created and the active workbook is attached and sent. This code used to work on Excel & Outlook 2003, but now in Excel & Outlook 2007 I'm getting the error: Run-time error '429': ActiveX component can't create object and is stopping on the line Set OutApp = GetObject(, "Outlook.Application") FY If I comment out the Set OutApp... and If OutApp.... lines and uncomment the Set OutApp create object line, I still get the same error. Dim OutApp As Object Dim OutMail As Object Dim SigString As String Dim Signature As String 'Set OutApp = CreateObject("Outlook.Application") Set OutApp = GetObject(, "Outlook.Application") If OutApp Is Nothing Then Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0)
View Replies!
View Related
Run-time Error '429' ActiveX Component Can't Create Object
I am trying to generate excel report output from access by click of a button. Part of the code is as follows: Dim lngColumn As Long Dim xlx As Object, xlw As Object, xlc As Object Dim DBS As DAO.Database Dim rst As DAO.Recordset Dim blnEXCEL As Boolean, blnHeaderRow As Boolean blnEXCEL = False 'If we do not want the first row we set Header to false blnHeaderRow = False 'Establish an EXCEL application object On Error Resume Next Set xlx = GetObject(, "Excel.Application") If Err.Number <> 0 Then Set xlx = CreateObject("Excel.Application") blnEXCEL = True End If Err.Clear I worked on development on a server and worked fine. However when I have moved the code and database to the desktop of mine I am having the following error in the line Set xlx = GetObject(, "Excel.Application") Run-time error '429' ActiveX component can't create object
View Replies!
View Related
Object Library Invalid Or Contains References To Object Definitions
I'm getting the following error: "Object library invalid or contains references to object definitions that could not be found" I wasn't getting that error last night and I'm not sure what I may have done to cause this error. It seems to be cause by code running on one sheet of my workbook, but I'm not really sure about that. I'm still a bit of a novice at VBA. I'm using Excel 2002 SP3 and I'm running MS XP Home as my OS. Do you have any ideas what can cause this error and/or how to trace down the offending objects/code?
View Replies!
View Related
Open Folder In Explorer
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 Replies!
View Related
Multiple VBA Project Explorer
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 Replies!
View Related
Open My Computer In Windows Explorer
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 Replies!
View Related
Multiple Instances In Project Explorer
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 Replies!
View Related
See Workbook Across Internet
I would like to run a spreadsheet on one machine and watch it on another machine across the internet. either excel to excel or excel to web page the data is live and changing so i would rather not have a web page i have to refresh all the time i thought excel to excel would be the cleanest way. how can i achieve this
View Replies!
View Related
Internet Navigation
I am trying to edit the Copy menus so that they only paste values. I have the following code in the workbook object: Private Sub Workbook_WindowActivate(ByVal Wn As Excel.Window) Application. CommandBars("Edit").Controls.Item("Paste").OnAction = "New_paste" Application.CommandBars(" Cell").Controls.Item("Paste").OnAction = "New_paste" End Sub Private Sub Workbook_WindowDeactivate(ByVal Wn As Excel.Window) Application.CommandBars(1).Reset End Sub and this code in a module:......... The module code is however bringing up an error message 'User-defined not defined' and I am not sure why.
View Replies!
View Related
Launching Windows Explorer Path Error
I am trying to launch windows explorer from within excel vba. The routine below is borrowed from another post on this site and modified for my purposes. 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" ..............
View Replies!
View Related
Prevent Overwriting Of Files In Windows Explorer
Perhaps, this question is much more related to Windows API but I thought of posting it here incase I get some more ideas. I am looking forward to develop a program wherein I can prevent or avoid an Excel file being overwritten by a different file with the same name in the same location in windows explorer. After a rapid search on the internet I have got something which I could use but that would just serve me the purpose of retreiving the overwritten file in windows explorer.
View Replies!
View Related
Low Memory Launching Windows Explorer
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 Replies!
View Related
Open An Internet Page
I have tried to open an internet page usin excel in order to get some information, for this I wrote the following code which doesn't work: Dim i As Integer For i = 2 To 3000 Workbooks.Open Filename:="http://www.anm.ro/anm/anm_maint.asp?anmPage=2&ID=i" Application.Goto Reference:="R12C3" Range("C12:C25").Select Selection.Copy ActiveWindow.ActivateNext ActiveCell.SpecialCells(xlLastCell).Next.Select ActiveSheet.Paste ActiveWindow.ActivateNext ActiveWorkbook.Close Next End Sub How can I make so that, this procedure to open page with ID 2, and 3and so on
View Replies!
View Related
Stop Internet Connection In VB Works On One PC But Not On
I have the following code in Excel which stops the connection to the internet 'code below Option Explicit Private Const FLAG_ICC_FORCE_CONNECTION = &H1 Private Declare Function InternetCheckConnection Lib "wininet.dll" Alias "InternetCheckConnectionA" (ByVal lpszUrl As String, ByVal dwFlags As Long, ByVal dwReserved As Long) As Long Private Const INTERNET_AUTODIAL_FORCE_ONLINE = 0 Private Const INTERNET_AUTODIAL_FORCE_UNATTENDED = 0 Private Declare Function InternetAutodial Lib "wininet.dll" (ByVal dwFlags As Long, ByVal dwReserved As Long) As Long Private Declare Function InternetAutodialHangup Lib "wininet.dll" (ByVal dwReserved As Long) As Long Sub Stop_BroadBand() If InternetAutodialHangup(0) Then End If End Sub 'code end
View Replies!
View Related
Check Boxes Copied From Internet
I copied a list of data from Vendio Counters for pages in my website, which includes a check Box in their 1st column. When copying the list, you automatically get the check box plus the data. When I paste it into my counter tracking spreadsheet, the Check Box is also pasted into one of my columns. The problem is that I only want 1 column which is the actual count. I have tried everything to delete the Check boxes to no avail. I've even tried to delete the column and it won't delete. All the other extra columns can be cleared or columns deleted
View Replies!
View Related
Deleting Temporary Internet Files
This is a follow up to an earlier post about web queries I need to be able to clean out my directory : "C:Documents and Settings" & Environ("UserName") & "Local SettingsTemporary Internet Files" But nothing I've tried seems to work. The kill command doesn't appear to work with wildcards... is there a way I can loop through the directory and delete the files one by one?
View Replies!
View Related
Code To Lookup A Cell Value On The Internet
I have a long list of movies and I would like a generic code that grabs the content of a cell and places it in the search box on IMDB, and presses enter. I am thinking that I can apply this same code to a bunch of different websites (wikipedia or google for example) That way, I can put a couple of buttons on a sheet or toolbar and use them to look up a cell value on the web. I don't program in VBA other than some low level copying and modifying code but this seems like it could be reasonably done.
View Replies!
View Related
Insert Image Into Cell From Internet
I want a function that takes a URL string and then inserts a picture into the cell and fits it into the size of the cell (which I made square). The images are small but over 50 000 so it would be impractical to download them all; thus I want the spreadsheet to insert a specific one, based on my formula. Tried a macro I found but it only gave the the '1004 Picture class' error. So the function must be simple to use, maybe: ....
View Replies!
View Related
Delete Temporary Internet Files
When I run a webquery to download information from online I have found the common 1004 error to occur very often however I have found that if I delete my temporary internet files prior to running the webquery, this problem does not occur. I therefore require an automated function to delete the temporary internet files however the simple 'Kill' statement does not seem to work.
View Replies!
View Related
Vlookup Issue With Data Downloaded From Internet
I am trying to use vlookup function with web query data and some of the data has embeded characters I can not see and vlookup does not work (can not match even though numbers appear to be the same). I have attached a test file with the data and formula and a detailed explanation. Found this ....
View Replies!
View Related
VBA Coding To Detect Internet Connection
Afternoon All - i have an excel workbook that runs on 20 remote machines that i do not have direct access to - i am placing upgrades on the net but looking at finding a way for excel to detect the update what i need it to do first is check if the machine is connected to the internet.
View Replies!
View Related
Navigating On The Internet -Selecting A Button On A Webpage
I want to be able to select a button called 'GO' on the following website http://www.xe.com/ict/. I have the following code. On Error GoTo errHandler Dim IE As Object Set IE = CreateObject("InternetExplorer.Application") IE.Navigate "http://www.xe.com/ict" IE.Visible = True While IE.Busy DoEvents Wend IE.Document.all("Go").Item(0).Click oSubmit.Click errHandler ie.Quit: Set ie = Nothing
View Replies!
View Related
Cannot Locate Internet Server Or Proxy: Web Query
Currently my company is importing the data to excel spread sheet from the following website http://www.pjm.com/pub/account/lmpgen/lmppost.html and the data is displayed to the price board. It runs 24/7 and it refreshes data every minute. It was set up thro’ the web query, and there is no macro involved in importing. Whenever there is a problem with website, it gives the following error “Unable to open http://www.pjm.com/pub/account/lmpgen/lmppost.html. Cannot locate the Internet server or proxy server.’ Until someone clicks OK to the error message, the web query stops importing and the price board gets freezes. I tried with the following macro to avoid the error messages being poped up. Sub Auto_Open() Application.DisplayAlerts = False End Sub
View Replies!
View Related
|