Macro: Login To Web Query

Dec 15, 2006

So I have some data that I'd like to extract from some financial sites that I'm a member of (one in particular is investors.com). I try and pull stock info from the site, but I have to manually initiate a new web query, go to the website, login, then cancel the web query for the macro on my spreadsheet to start pulling information. What I'd like to do is have two cells referencing my user id and password, and then click a button that will goto the website from excel, login, and allow the extraction of financial info to occur.

View 6 Replies


ADVERTISEMENT

Getting Macro Program With Array Login

Aug 5, 2013

I need to write one Macro program for below logic.

A
B
C

123
123
‘TRUE’

123
234
‘TRUE’

[code]......

View 3 Replies View Related

Follow Hyperlink Method Macro & Login Automatically

Sep 8, 2006

I use the following to try to access a secure website ( https )

ActiveWorkbook.FollowHyperlink Address:=Hyperlink, NewWindow:=False

Where hyperlink is a string that is valid. ( i tested by doing a cut and paste to the browser and it works ! ) When i launch the macro, it always bring me to the login screen. But if i do a cut and paste, it will bring me direct to the content i want.

View 6 Replies View Related

Create Username And Password To Login Into A Macro Enabled Workbook

Jan 3, 2011

I need a macro ie when a user opens a macro enabled workbook,he should be asked for a username and password to access workbook. Administrator should have right to create users with reset password rights

View 5 Replies View Related

Web Query Macro

Mar 6, 2007

I'm using this macro in order to bring some data to two cells.. it's currently working great...

Sheets.Add
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://magpie.boise.itc.hp.com:8080/gip/fileStatus.jsp?transKey=GUS8301D&fileName=GUS8301DBN2AFH3M" _
, Destination:=Range("A1"))
.Name = "fileStatus.jsp?transKey=GUS8301D&fileName=GUS8301DBN2AFH3M"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False

However, as you can see from the text in bold i'm currently telling the url instead of bringing it from a cell with an url. I want the macro to be able to select the url from a cell.

I'm trying to use this solution, but i keep getting a Run-time erro ´5´:
Invalid procedure call or argument.

connstring = Range("GUS8301!B3").Value
With ActiveSheet.QueryTables.Add(Connection:=connstring, _
Destination:=Range("A1"))

View 9 Replies View Related

Macro Query

Jul 4, 2008

i have recorded a macro wherein i need to copy paste some data in my database everyday.
now the problem is tht the macro doesnot catch the last row.

for instance if i paste data today in A2:A10
tomorrow it should automatically paste data starting from A11.

the range of data tht i copy is not fixed.

This is a part of macro...
Range("A1").Select
Selection.End(xlDown).Select (This takes me to the last record on that row)
is there anyway i can copy the data in next column?

'Range("A11").Select (This will work only for the first time when i run the macro)

but if i use the same one tomorrow
Range("A1").Select
Selection.End(xlDown).Select This will take me to the last record but..
it will again go to
'Range("A11").Select
and then paste records there

View 9 Replies View Related

Sub Total Macro Query

Oct 22, 2007

I worked on this macro for about 2 hours, with only partial success.

I have credit card data (will attached next post) sorted by tender type. I recorded teh subtotal feature, after selecting the data. I used teh go to, special, last cell, feature to get the end cell for selection, and also set the print area to this range. I did it in relative mode.

the macro worked, but when I also tried to insert three rows above the "grand total" cell, then insert a sub total of just master card adn visa, it in one of these added rows didn't work upon playback.

also - Can I lock the position of my macro buttons? IN properties it's set to locked but they still move when teh data changes. Can i put them on teh tool bars?

View 12 Replies View Related

Macro To Change The Query

Mar 12, 2007

I have a Excel database query which of which i import into Sheet 1. On a daily basis I need to edit this query and change a critea field to yersterdays date. Is there a way in which I could run a macro to change this query for yesterdays date without having to manually go into the query?

I have tried to run the macro, however I can only run this if I have a specific date in my code e.g. 11/03/2007 and not a formula to show yesterdays date.

View 9 Replies View Related

Macro Running Sql Query

Apr 2, 2007

I want to write some VBA that retrieves data from a lotus notes database into excel. I will then have some other code that manipulates the data for the user. I have managed to do this with MS Query manually. However when I start to put into VBA my problems start. As I do not know Sql I use the macro record function. This worksso far so good. The problems seem to start when I re-run the macro and try to save the workbook. Excel just sits there with the CPU running at 99%. I left the pc for an hour and it was still in the same condition with the status bar showing save.

Sub Macro4()
With ActiveSheet.QueryTables.Add(Connection:= Array(Array( _
"ODBC;DSN=premax;Database=Premaxse000273.nsf;Server=local;UserName=John Cross/bsp;EncryptMaxSubquery=20;MaxStmtLen=4096;MaxRels=20;M" _
), Array( _
"axVarcharLen=1024;KeepTempIdx=1;MaxLongVarcharLen=1024;ShowImplicitFlds=0;MapSpecialChars=1;ThreadTimeout=60;" _ .............................

View 4 Replies View Related

Pass Parameter From Excel Through MS Query To MS Access Query

Nov 26, 2012

I have an MS Access query that contains a parameter. The parameter is a date field, and I have configured that in the Access query. If I run the query within the MS Access user interface, it prompts me for the paramater value as expected, and runs just fine. However, I want to connect to this query from within Excel as a data source.

I have created a connection to the Access file using ODBC from within Excel. In the MS Query window, I am merely selecting all of the fields resident in the MS Access query, and returning all values. In other words, there is no selection criteria in the MS Query. I have done this many times with Access queries that DO NOT contain a parameter, and everything works fine. However, in this instance, I need to pass a parameter through to MS Access in order for the query to run. At the moment, I get the "Too Few Paramaters...1 expected" error message. This makes sense, because I haven't figured out how to pass the paramater to MS Access.

Is there a way to structure this that does not involve VB code? If so, I'd love to know how. I have tried creating parameters in MS-Query with the same name, but although I get the prompt it doesn't connect with the Access query as the source for the parameter value.

If the solution requires using code, I'm good with VB Code in Excel...is there VB for Excel code that could make this happen?

Failing that, I guess there must be (I've seen a few in my search thus far) Access VB Code that can make this work. I'm very rusty using VB with Access, so this is my least favored solution. However, if this is the only option, keep in mind that I need to pass the paramater ultimately from a user who will initiate the process using Excel.

View 3 Replies View Related

Query Parameters Which Takes The Date From The Cell Into The Query

Mar 29, 2007

Need the query parameters which takes the date from the cell into the query. How should I modify my query if it needs to take the date from a cell?? The bold one date should be picked from one of the cell in sheet 2.

My query is this
WEB
1
http://fc-web-phl1-101.phl1:8090/gp/...runReport.y=12

Selection=15
Formatting=None
PreFormattedTextToColumns=True
ConsecutiveDelimitersAsOne=True
SingleBlockTextImport=False
DisableDateRecognition=False
DisableRedirections=False

View 2 Replies View Related

Macro To Connect To Infomaker And Run Query

Apr 17, 2014

I'm trying to get my macro to connect to Infomaker and run a query. I have successfully done this in the past by using the record macro function. But, when I try to record the macro and paste the query syntax from Infomaker into the commandtext box of the connection, I get the "too many line continuations" error.

I've been looking at ways to write the code rather than record, but the syntax for the Infomaker queries doesn't seem to mesh well.

The syntax of the query in Infomaker is (copy/pasted, all "'s are necessary):

Code:

SELECT "COMPANY"."CO_NAME",
"COMPANY"."FLAG",
"CO_REF"."CO_VALUE",
"ITEM"."ISSUE ",
"REFERENCE"." ID_VALUE",
MIN(CODE.PROD_CODE)
FROM "COMPANY",

[Code] ........

View 2 Replies View Related

How Do I Run A Query In Access Via A Macro In Excel.......

Jan 29, 2008

I have an access database that has many queries and in order to speed it up I have a Macro in access that runs it in no time, but I need to be able to run the query in access via a trigger in Excel and have come up with the below, but it's not working.

View 9 Replies View Related

DB Query Refresh/Update Macro

Jun 16, 2008

I am trying to write a creative procedure that on workbook open will check the name of the worksheet if it includes the day's date in sheetname & if it doesn't rename the sheet & delete current region from A1, else exit the sub.

Then runs a query on an Access DB to place in the above worksheet.

I need this due to novice XL & DB (8)users.

This is what I have at the moment on a test DB courtesy of J Walkenbach's sample files .....

View 9 Replies View Related

Showcase Query: Pause Macro

Nov 21, 2006

I am running a Showcase query from inside excel. I want the query to update, drop the data in excel save it and then close. The problem is that the save command is executing before the data is dropped. The Wait command pauses all processes so it won't work. Is there a way to have a minute of filler until the data is dropped so it will save?

View 5 Replies View Related

Macro Web Query Return Blank

Dec 19, 2006

The actual link from a list on the left side of that web page is "Printable List".
I can't work out why all other web pages work fine with;

Get External Data/Web Query, but this particular web page won't work.

Sub Test_A()

Sheets("test1").Select

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://acttab.com.au/interbet/racing?type=venues", Destination:= _
Range("A3"))
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With

End Sub

View 3 Replies View Related

Login Using VBA

Jul 20, 2009

I need to create a login username and password form which pops up when excel worksheet is open

Does anybody know the instructions for this task

View 9 Replies View Related

Database Query Macro- Password Prompt

Feb 26, 2009

I have created an Excel sheet that retrieves data from a ODBC source. I have created a macro using macro recorder to refresh the data by re-connecting to the database. However, the connection requires a password prompt and when the macro is run, you are still required to enter the password.

Is there anyway to make the macro so that the password is automatically entered and the user will just have to press a button to fully run the query update?

View 2 Replies View Related

Delete Query Tables Macro Code

Aug 14, 2008

I am currently working on a project that uses Excel to parse a .txt document. Its working quite well for me. It functions by having two worksheets. In the first worksheet I use the " import external data" menu to import my .txt file. In another worksheet I have set up fields that show only the important information from the .txt file and leave the junk behind.

I’m looking to improve the functionality of this by adding a button to automatically clear the data in the first worksheet so that new data can be added quickly.

I have searched the forum and found a couple of threads on "QueryTables". After reading up on those, I have made a simple button with the following code.

Sheets("Sheet1"). Cells.Clear
Sheets("Sheet1").QueryTables.Item(1).Delete

After I load a .txt file and parse it using the formulas set up, I copy my needed information and then press this button. The cells clear, and the QueryTables are "reset" (maybe not the right word). Now a different .txt file can be imported and the process starts again.

The problem I am having is that. If there is no "QueryTables.Item(1)" to delete, I get a run time error. (Run-time error '9': Subscript out of range).

Would anyone know how to make my button conditional to having a "QueryTable" active? I.E. If I press it when there is no data loaded it doesn't do anything or give me that error.

View 4 Replies View Related

Create An Conection With MS QUERY To A Csv And Query Data

Sep 6, 2008

I have a csv file on another drive on the network that i need to query. I believe that ms query would be the best way. I know that a DSN needs to be setup but this macro will be used by various users who wont know how to do that. thus I would like to create one via VBA every time the task needs to be run.
I haven't a clue how to do this and i need it to be explained to me in general terms with words of one syllable!

View 9 Replies View Related

Vba Login To Internet

May 13, 2008

how can I login to a website using vba. I googled many examples but still failed.

View 9 Replies View Related

Creating A Login Box

Apr 20, 2005

I want it so that when the workbook opens it prompts for a username and password. You can also have a button for "register" etc. Which will send you to a website.

View 9 Replies View Related

Login To Web Page Via Add-in

Jan 14, 2008

I use a tool that connects to Salesforce.com. It is an xla addin. It references a toolkit that is installed...

View 3 Replies View Related

Macro - Query Active Directory With Multiple Usernames

Apr 13, 2014

I am trying to query Active Directory for a list of user attributes by using a list of usernames and output the results into column B,C,D.....

All the usernames are listed in column A and it ranges from 100 to 1000 usernames.

The macro GetAdsProp works but it is very slow because it's a function and every time it gets called to return a value, it takes a long time to query. It will take forever to get 1000 users.

I've also tried the code below, however one of the AD attribute that I am querying for has a dash (i.e. test-address) and I can't put a dash in the vba code because it automatically puts spaces in between the dash and the text (see red text below) which will fail to find the attribute. Also, I need it to loop the whole column A and not just one account.

Sub LoadUserInfo()
Dim x, objConnection, objCommand, objRecordSet, oUser, skip, disa
Dim sht As Worksheet

' get domain
Dim oRoot
Set oRoot = GetObject("LDAP://rootDSE")

[Code] .....

View 3 Replies View Related

Username / Password At Login

May 31, 2013

I have below piece of code which I'm not sure how to finish up. What I'm trying to do is have 'Username' and 'password' entered before logging into the workbook. It does not have to be 'UserForm" if it is possible, but it would be useful if we use Ucase...

I'm just not sure how this code works with

"Sub sUserLogon(strStandardID As String, strPassword As String)"

stated in this way..

VB:
Sub sUserLogon(strStandardID As String, strPassword As String)
Dim strUserName As String
Dim StrMessage As String
Application.DisplayAlertsAlerts = False
StrMessage = "User Logged In"

[Code] ......

View 2 Replies View Related

Creating Login Via A Userform?

Dec 6, 2013

[URL]

Basically I’m trying to create a login userform that launches once the database opens.

Userform = LoginTextbox = UserformTextbox = PasswordCommand Button = UserloginCommand Button = UsercloseSheet containing passwords = Userpasswords
Usernames are stored vertically in the A column, and Passwords vertically on the B column both starting from row 1.

I’ve been using code found at [URL] but I’m struggling to make it work. Some of the variables listed below may be useless but I’m not entirely sure so I’m sceptical about removing them. !

VB:
Option Explicit
Dim ws As Worksheet
Dim Userpasswords As Worksheet

[Code]....

View 5 Replies View Related

Login To Website Using VBA Script

May 19, 2014

I'm trying to login to [URL] ...... using VBA. I cannot share login details. How it might be able to work?

View 3 Replies View Related

Create Login Screen

Mar 4, 2014

I am quite new to the excel vba. I am trying to create a login screen

So whenever i open my excel sheet, the first thing should happen is that there should be a login screen and ot should ask for password and id. Once you provide the login id and password, you would proceed to the next screen.

View 2 Replies View Related

Drop-down List At Login

Jul 16, 2008

I have an excel file where different people have to make their comments. So far I have sent out the files on email and they sent it back and then copied their comments to the original file, but from now on I would like to share the file and let them to write in their comments.

In order to make it professional I would like the file to work as following (lets suppose that I am Mr.X and I have to write my comments in row 2,6 and 9):

1. When I (Mr.X) open the excel file, there is a pop up message box with a drop down list saying: "Please select your name:"

2. In the drop down list I select my name (Mr.X) and I press OK.

3. Then I get logged in the file and I will see rows 2,6 and 9 only.

4. After making my comments I save the file and log out.

As for the example lets assume that there are 3 people who are making the comments. Mr.X /rows 2,6 and 9/, Mr.Y /rows 1,3 and 8/ and Mr.Z /rows 4,5 and 7/

View 14 Replies View Related

Login To HTTPS Server

May 2, 2013

I am looking to further improve this code by adding the functionality of logging to a secure HTTPS server using username and password.

Code:

Sub TestFileExistsandDownload()
'This code will test a web address to see if a file exists
'If the file exists, it will download the file.
' It's a mixture of code retreived from 2 sites:
' [URL]...
' [URL]....

[Code]...

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved