excel-vba

Macro to Hyperlink a cell to itself

笑着哭i 提交于 2020-01-11 12:21:14
问题 I have already created a macro that allows me to double click a hyperlink and it displays information from another sheet based on the cell that I have clicked on. Now I would like to automate the hyperlinking process, what I need is a macro that will take a list of names and hyperlink all of those cells to themselves. so far I have a macro that hyperlinks the activated cell but returns a value of 0 but is hyperlinked ( first set of code) I will include the macro that I recorded from manually

Send SMS from Excel VBA

谁都会走 提交于 2020-01-11 12:14:10
问题 I have code for my Excel application. It's a membership loyalty program and every time members are billed it will send the current billed amount along with points earned or redeemed. I have purchased a bulk SMS account and they have provide me the API. I need to use this API in my code. Below is the API provided by my bulk SMS provider. https://malert.in/api/api_http.php?username=user&password=pwd&senderid=myid&to=9000000000&text=Hello%20world&route=Enterprise&type=text&datetime=2018-02-22

Send SMS from Excel VBA

吃可爱长大的小学妹 提交于 2020-01-11 12:14:05
问题 I have code for my Excel application. It's a membership loyalty program and every time members are billed it will send the current billed amount along with points earned or redeemed. I have purchased a bulk SMS account and they have provide me the API. I need to use this API in my code. Below is the API provided by my bulk SMS provider. https://malert.in/api/api_http.php?username=user&password=pwd&senderid=myid&to=9000000000&text=Hello%20world&route=Enterprise&type=text&datetime=2018-02-22

Excel VBA change option in the HTML select tag

让人想犯罪 __ 提交于 2020-01-11 11:56:48
问题 Recently, I posted the question vbscript capture text in the HTML select option tag. This helped me tremendously on an Internet Explorer platform. However, I have a new project with a bit more complex of a web site. The web site has multiple nested tables that are formatted to hold form elements. My team and I have figured out how to get and set data within most of the elements except the drop down box ( select tag). We are able to get the text from the drop down, but we can't change the

Multiple Range Intersect in excel VBA

青春壹個敷衍的年華 提交于 2020-01-11 11:48:26
问题 Why does this not work? I'm trying to get excel to check for any changes in column B and D if column B has changed then do some actions and so on. Private Sub Worksheet_Change(ByVal Target As Range) Dim lc As Long Dim TEMPVAL As String Dim ws1, ws2 As Worksheet Dim myDay As String Set ws1 = ThisWorkbook.Sheets("Lists") myDay = Format(myDate, "dddd") If Intersect(Target, Range("B:B")) Is Nothing Then Exit Sub If Target = "" Then Exit Sub MsgBox "Row: " & Target.Row & "Column: " & lc With

concatenate unknown number of column and rows [duplicate]

独自空忆成欢 提交于 2020-01-11 11:29:29
问题 This question already has an answer here : TEXTJOIN for xl2010/xl2013 with criteria (1 answer) Closed 2 years ago . I am trying something since a couple of days and I am really lost about it. Could someone help me about it please. I would like to concatenate columns in Excel from the first column to the last non-empty column and add a comma between each column. Following that, I would like to apply the loop from the first line to the last non-empty line. I succeed to do it with a known number

VBA - Index / Match function with multiple criteria

末鹿安然 提交于 2020-01-11 11:24:11
问题 I am facing an issue when trying to compile a multiple criteria Index/Match code in VBA. This might be simple - but i am fairly new to VBA and nothing i have found around here worked. Example: I have a large amount of data in a specified range: Sheets("CustomerAccounts").Range(CustomerSheetRange)) - I need VBA to return data from column titled "Values" by checking three criteria: Customer = X, Type = External, OriginCountry = UAE (columns are not adjacent in the original spreadsheet) The

VBA Excel Variable Sorting on Multiple Keys/Orders

旧巷老猫 提交于 2020-01-11 11:12:51
问题 How can I sort on multiple columns (keys/orders) at the same time? When I run my below code it re-sorts the data when executing each line instead of one sort with multiple columns in the sort. Changing the 'key' or 'order' number from 1 to 2, etc. does not help. Thanks. wsLast_Row = Cells(Rows.Count, 2).End(xlUp).Row Range("A3:BZ" & wsLast_Row).Sort key1:=Range("A3:A" & wsLast_Row), _ order1:=xlAscending, Header:=xlNo Range("A3:BZ" & wsLast_Row).Sort key1:=Range("B3:B" & wsLast_Row), _ order1

VBA Excel Variable Sorting on Multiple Keys/Orders

て烟熏妆下的殇ゞ 提交于 2020-01-11 11:12:41
问题 How can I sort on multiple columns (keys/orders) at the same time? When I run my below code it re-sorts the data when executing each line instead of one sort with multiple columns in the sort. Changing the 'key' or 'order' number from 1 to 2, etc. does not help. Thanks. wsLast_Row = Cells(Rows.Count, 2).End(xlUp).Row Range("A3:BZ" & wsLast_Row).Sort key1:=Range("A3:A" & wsLast_Row), _ order1:=xlAscending, Header:=xlNo Range("A3:BZ" & wsLast_Row).Sort key1:=Range("B3:B" & wsLast_Row), _ order1

Query div element by class name using Excel VBA

南楼画角 提交于 2020-01-11 11:08:08
问题 I'm trying to get the data to Excel of a div element with a specific class name, like: <div class="myClass"> <span>Text1</span> <span>Text2</span> </div> My VBA code: Sub GetData() Dim oHtml As HTMLDocument Dim oElement As Object Set oHtml = New HTMLDocument With CreateObject("WINHTTP.WinHTTPRequest.5.1") .Open "GET", "http://www.example.com/", False .send oHtml.body.innerHTML = .responseText End With For Each oElement In oHtml.getElementsByClassName("myClass") Debug.Print oElement.Children(0