excel-2010

How can I automate the download dialog box in IE using VBA?

牧云@^-^@ 提交于 2019-12-02 09:45:12
I'm completely new on here and have only been using VBA for about 6 months. Needless to say, forum posts on here and a few other places have helped me immensely so far. I'm trying to develop a script to take data from Morningstar and copy it in to excel (note this is for my personal non-commercial use). I'm confident that I can code most of the required VBA but am stuck on automating the selection of "save" when the IE download dialog box pops up. I've seen a few related posts but nothing I've been able to reverse-engineer as of yet and any help would be greatly appreciated! My code for this

Excel 2010 Macro to compare two columns for finding the matched value

拜拜、爱过 提交于 2019-12-02 09:20:11
I am very new to Excel macros and VBA, kindly help me please with my below situation. Here is the situation, i have two sheets (sheet1 and sheet 2) in sheet1 there is two columns name and number and in sheet2 i have numbers along its other information like date, charging and etc. Sheet 1 No Name PhoneNumber 1 Bob 7254 2 Cristin 5468 3 Luara 1234 Sheet2 No PhoneNumber Date Charged Name 1 1145 12/30/2014 2$ 2 7254 11/26/2014 3$ 3 2365 3/9/2014 7$ 4 5468 3/10/2014 5 1234 3/11/2014 What i want is to compare PhoneNumber column of sheet2 (B column) with PhoneNumber column of sheet1 (C column) and if

Scripting in Excel — Highlighting like values

守給你的承諾、 提交于 2019-12-02 08:46:21
问题 I am trying to create a macro that will basically highlight like values in column A the same color and alternate between a blue and white coloring. Therefore, exact values are grouped together by color. Hope this makes sense? At this moment I am doing the highlighting manually (but there are 12000+ rows so thats not a smart idea). I am not so great with VBA yet and am still trying to learn more. So basically this macro will check is the value in cell x of column A is the same of cell x+1 in

Excel 2010 VBA. Concatenate 2 columns from a Sheet and paste them in another

天涯浪子 提交于 2019-12-02 08:03:57
Using Excel 2010, I'm trying to create a script that concatenates two text columns (A and B) from Sheet1 and pastes the result in column A of Sheet2. The workbook uses an external datasource for loading both columns, so the number of rows is not fixed. I've tried the following code, but not working. variable lRow is not taking any value. Sub Concat() Sheets("Sheet1").Select Dim lRow As Long lRow = Range("A" & Rows.count).End(xlUp).Row For i = 2 To lRow ActiveWorkbook.Sheets("Sheet2").Cells(i, 1) = Cells(i, 1) & Cells(i, 2) Next i End Sub What am I doing wrong. Thanks for helping! As to what

VBA Excel Macro To Update List Via External File

有些话、适合烂在心里 提交于 2019-12-02 07:51:35
I have an excel sheet that has two sheets. One sheet is hidden that has a list of values called "Location." On the main sheet I have created a drop down menu that pulls from the hidden sheet. How can I store these values in an external file (Excel, .txt, etc.) so I can hit a macro button (VBA) that will replace/update the list on the hidden sheet with any/all new Location values that will be stored in an external file? I believe this is what you are looking for: Dim intPointer as Integer Dim strFileToImport as String Dim strLine as String intPointer = FreeFile() Open strFileToImport For Input

vbScript opens up excel but doesn't load macro/modules?

允我心安 提交于 2019-12-02 07:05:30
I m in a very weird situation. I created a vbs script that would open my excel file. I had defined vba code in WorkBook_open method. I thought creating a vbs script to open up my excel would invoke my workBook_open method and execute the vba code inside it. But I was wrong. Below is my vbs code. filePath = "E:\data_extracts\mydata.xlsm" Set oExcel = CreateObject("Excel.Application") oExcel.Workbooks.Open(filepath) oExcel.Visible = True oExcel.Run "RefreshDataFromIQY" oExcel.ActiveWorkbook.Save oExcel.ActiveWorkbook.Close oExcel.Quit Set oExcel = Nothing On debugging, it fails at oExcel.Run

Strange cell addresses behaviour for non-contiguous ranges: VBA

空扰寡人 提交于 2019-12-02 06:23:03
问题 I was trying to answer this question when I came across some bizarre VBA behaviour in Excel. I have written a very simple sub to demonstrate the issue: Sub debugAddresses(rng As Range) Debug.Print "Whole range: " & rng.Address Dim i As Long For i = 1 To rng.Cells.Count Debug.Print rng.Cells(i).Address Next i End Sub I loop over each cell in a range object and print its address, simple right? debugAddresses Range("B2:B3") ' Result as expected: ' >> Whole range: $B$2:$B$3 ' >> $B$2 ' >> $B$3

a new build error after making change by replacing version=10.0.0.0 with 11.0.0.0 in VS2010

淺唱寂寞╮ 提交于 2019-12-02 05:55:28
问题 I got the same problem as Build Error + Creating VSTO addin for excel 2010 After making the change according to the solution, I got the new error: The "InitializeDefaultProperties" task could not be loaded from the assembly Microsoft.VisualStudio.Tools.Office.BuildTasks, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file or assembly 'Microsoft.VisualStudio.Tools.Office.BuildTasks, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one

IE11 Automation via Excel VBA - company webpage

↘锁芯ラ 提交于 2019-12-02 05:47:19
问题 First I'm very new to trying to automate IE via Excel VBA. That being said, I'm working to automate a login to a company-specific webpage (only accessible to our employees). The goal is to automate the login (employee number, password and click Login). I find Firefox to be particularly helpful in identifying fields so that's what I'm using in the screenshot. I found some code online to navigate to a webpage and enter something into a search box. I've modified that as follows (the included

Paste Values instead of formulas with PasteSpecial - VBANewbie

左心房为你撑大大i 提交于 2019-12-02 05:24:19
I am absolutely new to vba. I want to copy certain values in cells from two tabs ("Equities", "Bonds") into a third one ("ZSM") with the following code. Sub AllesAufEinmal() Call Spalten Call Wertpapiere Call Daten End Sub Sub Spalten() ' ' Spalten Macro ' Sheets("Equities").Select Range("A4").Select Range(Selection, Selection.End(xlToRight)).Select Selection.Copy Sheets("ZSM").Select Range("A4").Select ActiveSheet.Paste Range("A4").Select Sheets("Bonds").Select Range("B4").Select Range(Selection, Selection.End(xlToRight)).Select Application.CutCopyMode = False Selection.Copy Sheets("ZSM")