vba

Prompt for verifying recipients

微笑、不失礼 提交于 2021-02-11 14:50:31
问题 When sending an email to anyone outside of my business I want a prompt asking for confirmation with all the recipients printed in the prompt. I tried code from Outlook VBA to verify recipient. It does nothing. I tried multiple things from multiple sites but none give me what I am looking for. I am using the following code: Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Dim lbadFound As Boolean Dim badAddresses As String lbadFound = False CheckList = "test@test.nl"

(Excel VBA): Accessing JSON file - operation timed out

ぃ、小莉子 提交于 2021-02-11 14:40:57
问题 I'm attempting to pull data from a JSON file on the web. I'm using a dummy JSON file for the time being to get things working. My code is below, but it times out every time and doesn't return anything. The same happens if I use different URLs also. Sub Test() Dim strResult As String Dim objHTTP As Object Dim URL As String Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1") URL = "https://jsonplaceholder.typicode.com/posts/2" objHTTP.Open "GET", URL, False objHTTP.Send strResult = objHTTP

Selenium Basic VBA focus on new tab that is opened by Click

偶尔善良 提交于 2021-02-11 14:34:06
问题 I'm working on the Selenium Basic Wrapper for Excel VBA, but upon clicking a button that opens a new tab, I am unable to get the selenium web-driver to switch focus onto the new tab that is opened, and to close the original tab.. Believe this should be achievable using the Java Selenium, but is there any way to do it through the Selenium Basic wrapper on excel VBA? Have tried using bot.switchtopreviouswindow/nextwindow to no avail, Selenium does not even seem to detect the new tab/window

How do I combine duplicate rows without losing unique data in R or VBA?

我只是一个虾纸丫 提交于 2021-02-11 14:32:18
问题 I have a table in excel where there's unique columns but many duplicate rows. Duplicates is measured by the column "uniqueID" which is an email stored as a string. Rows can have the same uniqueID but with missing data in other columns, or different data in the same column. I want to be able to combine and merge these duplicate rows such if the same uniqueID has the same response for the strings will be combined and concatenated such that data won't be lost. All data are strings. I've tried

SAP GUI script how to test the presence of a message

白昼怎懂夜的黑 提交于 2021-02-11 14:30:12
问题 Below I have a pretty simple and straight forwards script for update Valid To date on Agreement/Contract in SAP. My script runs fine but if the date I want to change to is already the same then there is nothing to change/save and therefore the script stops... After this step session.findById("wnd[1]/usr/btnSPOP-OPTION1").press is performed the message from the system is No data changed and it's after this step the script stops. Message No. 06022 The recording part in the script is based on

Display random number in slide using VBA

荒凉一梦 提交于 2021-02-11 14:21:27
问题 I need to generate a random number between 1 and 30 and display it on every slide. I found the following code online: Sub UpdateRandomNumber(oSh As Shape) Dim X As Long 'Make the shape’s text a random number 'X or less 'Change 12 below to any number you’d like: X = 30 oSh.TextFrame.TextRange.Text = CStr(Random(X)) End Sub Function Random(High As Long) As Long 'Generates a random number less than or equal to 'the value passed in High Randomize Random = Int((High * Rnd) + 1) End Function Sub

Use array as X axis and not having it show up as “Series 1”

十年热恋 提交于 2021-02-11 14:21:14
问题 I'm creating a line graph and I use a 2d array with three arrays in it. The first one contain dates and it's supposed to be the X axis, the next two is the data that should be shown as lines on the graph. Everything works as it should, except for one thing. On the side of the graph you see the names of three series, "Series1" (the dates), "Delivery speed" and "Delivery Average". I only want to show the names of the last two series not the first one. Is it possible to only use the first array

Use array as X axis and not having it show up as “Series 1”

放肆的年华 提交于 2021-02-11 14:20:06
问题 I'm creating a line graph and I use a 2d array with three arrays in it. The first one contain dates and it's supposed to be the X axis, the next two is the data that should be shown as lines on the graph. Everything works as it should, except for one thing. On the side of the graph you see the names of three series, "Series1" (the dates), "Delivery speed" and "Delivery Average". I only want to show the names of the last two series not the first one. Is it possible to only use the first array

Get the BALANCE for each item for every Row

℡╲_俬逩灬. 提交于 2021-02-11 14:19:35
问题 I'm trying to perform a VBA Function or 1 solutions that minus row by row based on stock (available quantity), order by date. I'm actually using ADO to import item list & quantity, use SQL command to Group by STOCK Quantity from another sheet, and I planned to put all information to the same array, start to minus rows by row OR use SQL command do anything in recordset (just an idea, I don't know whether is it possible/ good way or not). I hope to have any example that similarly to this or any

MsgBox caused charts to appear as blank

旧街凉风 提交于 2021-02-11 14:15:09
问题 I have created code to fit a model to some data and then create a chart comparing measured/fitted data. I want to include a msgbox so that the user can check that the chart shows a decent fit and then OK it to continue. Even though the code for the msgbox is after the creation of the charts (right at the end of the sub), the charts are displayed as blank while the msgbox is shown. The charts display properly after either yes or no is selected in the msgbox. I have tried, pausing the sub for a