vba

Joining two arrays in vba?

不羁的心 提交于 2021-02-18 16:54:06
问题 How do I combine these arrays with the outcome of (2, 4, 5, 3, 7, 6) ? array1 = Array(4,5,3,7,6) array2 = Array(2) 回答1: You could potentially Join() and concatenate your two arrays, and then Split() the result back to a new array: array3 = Split(Join(array2, ",") & "," & Join(array1, ","), ",") Explanation: Join() will return a string that has each element in the array (first parameter) delimited by a "," (second parameter). We concatenate those two joined arrays with one more comma to get a

Display Excel Workbook on a Userform

为君一笑 提交于 2021-02-18 11:09:37
问题 Objective : As the title suggest, how do we display the workbook on the userform without using any third party controls. By Display , I mean show it on a userform where a user can select a worksheet and view the contents of that worksheet. This post is an attempt to self answer the question. 回答1: The method that I am going to demonstrate below will not use any Third Party Control. In fact it will display the worksheet in an image control. This obviously means that you cannot interact with the

Display Excel Workbook on a Userform

南楼画角 提交于 2021-02-18 11:07:24
问题 Objective : As the title suggest, how do we display the workbook on the userform without using any third party controls. By Display , I mean show it on a userform where a user can select a worksheet and view the contents of that worksheet. This post is an attempt to self answer the question. 回答1: The method that I am going to demonstrate below will not use any Third Party Control. In fact it will display the worksheet in an image control. This obviously means that you cannot interact with the

Horizontal vs Vertical array delimiters - International

假装没事ソ 提交于 2021-02-18 10:19:18
问题 Following up on an earlier question I had about horizontal vs vertical arrays, I have a question about it's respective delimiters. Problem definition: Hereby an example of an incorrect way of comparing two arrays: {=SUMPRODUCT(--({"Apple","Pear"}={"Apple","Lemon","Pear"}))} The correct way, in case of an English application countrycode would be: {=SUMPRODUCT(--({"Apple","Pear"}={"Apple";"Lemon";"Pear"}))} Within an English version (most likely more than just English) of Excel these delimiters

Web scraping in Investing.com with Excel vba

自古美人都是妖i 提交于 2021-02-18 08:48:34
问题 I have no knowledge of vba. Only the macro recorder is used. I need to download the data from a web page to an Excel spreadsheet and with my knowledge of vba I am not capable. In particular, what I want to do a macro to download to Excel a data table of the page: https://www.investing.com/equities/cellnex-telecom-historical-data This download would have to be configured in terms of time, date range and ordering. The steps would be the following: 1.- The objective is to copy the data from the

How to close an Internet Explorer instance inside an Excel VBA

本小妞迷上赌 提交于 2021-02-18 07:32:50
问题 I'm running an Excel VBA macro which opens a IE instance, extracts data from a URL and then is supposed to close the instance again. Dim IE As Object Set IE = CreateObject("InternetExplorer.Application") Set IE = GetObject("new:{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}") ' Do stuff... ' Clean up IE.Quit Set IE = Nothing I looked up that method and it is supposed to close the IE instance. However that does not work for me. The task manager confirms that the iexplorer.exe process is still running.

How to close an Internet Explorer instance inside an Excel VBA

烂漫一生 提交于 2021-02-18 07:32:33
问题 I'm running an Excel VBA macro which opens a IE instance, extracts data from a URL and then is supposed to close the instance again. Dim IE As Object Set IE = CreateObject("InternetExplorer.Application") Set IE = GetObject("new:{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}") ' Do stuff... ' Clean up IE.Quit Set IE = Nothing I looked up that method and it is supposed to close the IE instance. However that does not work for me. The task manager confirms that the iexplorer.exe process is still running.

Create a new chart for each row using VBA Macros in Excel

雨燕双飞 提交于 2021-02-18 07:25:24
问题 First and foremost let me just say this website is a godsend! I have a range of data B2:AS40 for each month. The month is in A2:AS2, within A2:A40 is a list of names, all of this is in 'Sheet1' After some previous searches on here I have come up with the following, the script makes a new chart for every line, creates a title and puts in the MajorGridlines at 6mth intervals however doesnt plot the data. I cannot for the life of me work out why!! Please help Sub test() Dim Row As Integer Dim ws

What is the best VBA data type`key`=>`value` to save data same as PHP array

让人想犯罪 __ 提交于 2021-02-17 21:31:41
问题 I'm working with VBA and need to save data in type key => value to getting fastest; This data type help me cache responese text from http request, increase query speed. But I don't know what is the best way to do it? I need a data type same as php array with key=>value ! Thank for help! 回答1: Have you looked at dictionary object? It's available as part of the Microsoft Scripting Runtime. A clear example of how to add this is given by this SO answer. Sub DictExample1() Dim dict As Dictionary

What is the best VBA data type`key`=>`value` to save data same as PHP array

六月ゝ 毕业季﹏ 提交于 2021-02-17 21:31:34
问题 I'm working with VBA and need to save data in type key => value to getting fastest; This data type help me cache responese text from http request, increase query speed. But I don't know what is the best way to do it? I need a data type same as php array with key=>value ! Thank for help! 回答1: Have you looked at dictionary object? It's available as part of the Microsoft Scripting Runtime. A clear example of how to add this is given by this SO answer. Sub DictExample1() Dim dict As Dictionary