excel

VBA How to use FindWindowEx when have Windows Handle

北城以北 提交于 2021-02-10 14:29:42
问题 I have looked over the numerous "similiar questions" that pop up when you submit a question but unfortunately none of these fit my problem, plus they are all in c++ or c#. I found this and it has helped me get the handle : My problem now is that how am I to use this handle to click "No" on this window: My code below is working to retrieve the handle without error (I assume the handle output is correct), however I am unsure where to go, where to look for help on how to use the handle to click

Attach PDF and send email via Outlook

自作多情 提交于 2021-02-10 14:27:47
问题 I wrote a VBA code to send an email from a distribution list in Excel. I want to attach a PDF. (It is one PDF on my hard drive.) Column A is email address, column C is name, column E has the path to the PDF & cell J2 has what the body of the email will say. How do I attach the pdf with the path in column E? I have only 4 rows that I'm testing, however I'd like to send everything until the last row, which could vary. It's actually two macros, it would be nice if it were only one. Sub SendEmail

Attach PDF and send email via Outlook

天大地大妈咪最大 提交于 2021-02-10 14:26:18
问题 I wrote a VBA code to send an email from a distribution list in Excel. I want to attach a PDF. (It is one PDF on my hard drive.) Column A is email address, column C is name, column E has the path to the PDF & cell J2 has what the body of the email will say. How do I attach the pdf with the path in column E? I have only 4 rows that I'm testing, however I'd like to send everything until the last row, which could vary. It's actually two macros, it would be nice if it were only one. Sub SendEmail

Excel Subtracting time

巧了我就是萌 提交于 2021-02-10 14:17:53
问题 Currently trying to setup a formula that will calculate the hours/minutes between two different hours of time. I currently use the following formula in Cell D3 and receive 12:35am as the answer: =C3-B3 What I would want it to display is 35 minutes, which is the correct amount of time in between (6:42AM and 7:17AM). 回答1: Something like this would work: =TEXT(C3-B3,"[m]") or if you want "minutes" written after =TEXT(C3-B3,"[m] ""minutes""") Examples: 回答2: C3-B3 and formatted as [m] will work -

#value! error in UDF when doing simple division

时光毁灭记忆、已成空白 提交于 2021-02-10 14:17:17
问题 When doing a simple division problem with some defined variables I am getting the #value error in a UDF. The variables are all defined as doubles. Apologies in advance as I am a mechanical engineer by trade so my coding is very amateur. I have a design book I use in excel that can end up being many columns long so to avoid this I am trying to code some UDFs to eliminate the all the cells just doing calculations for other cells. With that, I have run into an issue that I have in my

Excel Subtracting time

老子叫甜甜 提交于 2021-02-10 14:15:35
问题 Currently trying to setup a formula that will calculate the hours/minutes between two different hours of time. I currently use the following formula in Cell D3 and receive 12:35am as the answer: =C3-B3 What I would want it to display is 35 minutes, which is the correct amount of time in between (6:42AM and 7:17AM). 回答1: Something like this would work: =TEXT(C3-B3,"[m]") or if you want "minutes" written after =TEXT(C3-B3,"[m] ""minutes""") Examples: 回答2: C3-B3 and formatted as [m] will work -

excel two different color gradient within same column

心不动则不痛 提交于 2021-02-10 14:12:53
问题 Is it possible to fill a column in red and green so that the values above a certain number (e.g. 1000) are highlighted in a gradient of red and the ones below the number are highlighted in a gradient of green? 回答1: Use a 3-Color-Scale with white as the middle color and number set at 1000: 来源: https://stackoverflow.com/questions/48037022/excel-two-different-color-gradient-within-same-column

Excel/VBA - Fill color of a cell in pivot table according to column value

半城伤御伤魂 提交于 2021-02-10 14:12:07
问题 I have a pivot table that the source is a table on another sheet. The source table looks like this: Client Type of income Value Month Control A Residential 1000 January Paid A Commercial 2000 February Not paid B Residential 2000 February Not paid C Commercial 1500 February Paid D Consulting 5000 March Paid The pivot table is set like this: Column - Month Row - Client Value - Sum of value Client January February March A 1000 2000 0 B 0 2000 0 C 0 1500 0 D 0 0 5000 Now I want to fill the color

CUBESET() function in Excel with Multiple criteria

巧了我就是萌 提交于 2021-02-10 13:57:13
问题 I'm trying to create a CUBESET function in Excel, but I don't know how to filter it using multiple criteria within the same dimension . This is what I have so far working with one criteria. Example 1: =CUBESET("ThisWorkbookDataModel","{[Facebook].[Bucket (C)].[All].[DPA]*[Facebook].[AudienceType (C)].children}","Bucket") Example 2: with date in cell C3 =CUBESET("ThisWorkbookDataModel","{[Facebook].[Week End].[All].["&TEXT($C$3,"m/d/yyyy")&"]*[Facebook].[Campaign (C)].children}","Campaign

Class Object TextBox on Userform available methods

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-10 13:37:14
问题 I have noticed that when I create a Class Module for a Textbox and use that on my forms - by adding via VBA in the form init event - neither the Enter or Exit methods are available. Of course if I just add a textbox to the form they are. I can get the DblClick method to work fine so my class is setup correctly and my form.init code is also ok. When I look in the Object browser for MSForms.TextBox I see it doesn't have Enter or Exit methods and presume this is the reason. There is no urgency