vba

Extract table from webpage using VBA

家住魔仙堡 提交于 2021-02-10 15:02:13
问题 I would like to extract the table from html code into Excel using VBA. I have tried the following code several times with changing some of the code but keep on getting error. Sub GrabTable() 'dimension (set aside memory for) our variables Dim objIE As InternetExplorer Dim ele As Object Dim y As Integer 'start a new browser instance Set objIE = New InternetExplorer 'make browser visible objIE.Visible = False 'navigate to page with needed data objIE.navigate "http://www.bursamalaysia.com/market

Setting RowHeight Excel VBA

限于喜欢 提交于 2021-02-10 14:49:01
问题 I've been struggling for several hours to set row heights for an implied range. The code works except for two problems 1. ALL rows with data are set to AutoFit instead of just the intended range and 2. I cannot seem to add '3' to the row height per the 2nd to last line of code: Sub SetRH() ActiveSheet.Unprotect Application.ScreenUpdating = False Range("C" & (ActiveCell.row)).Select Range(Selection, Selection.End(xlDown)).Select Range(Selection.Offset(0, 0), Selection.Offset(0, 4)).Select

Setting RowHeight Excel VBA

☆樱花仙子☆ 提交于 2021-02-10 14:46:31
问题 I've been struggling for several hours to set row heights for an implied range. The code works except for two problems 1. ALL rows with data are set to AutoFit instead of just the intended range and 2. I cannot seem to add '3' to the row height per the 2nd to last line of code: Sub SetRH() ActiveSheet.Unprotect Application.ScreenUpdating = False Range("C" & (ActiveCell.row)).Select Range(Selection, Selection.End(xlDown)).Select Range(Selection.Offset(0, 0), Selection.Offset(0, 4)).Select

Disable warning about a program trying to send an email

时间秒杀一切 提交于 2021-02-10 14:41:03
问题 I send an email using Outlook 2010 with Access VBA. I get a warning from Microsoft Outlook about a program trying to send an email and I'm forced to push allow. I have the Microsoft Outlook Object Library 14 from the reference in VBA. In Outlook - Options - access through programin is marked on don't show warnings. I added the next entries in regedit Key: HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\ <version>\Outlook\Security Value name: AdminSecurityMode Value type: REG_DWORD Value:

Disable warning about a program trying to send an email

感情迁移 提交于 2021-02-10 14:40:09
问题 I send an email using Outlook 2010 with Access VBA. I get a warning from Microsoft Outlook about a program trying to send an email and I'm forced to push allow. I have the Microsoft Outlook Object Library 14 from the reference in VBA. In Outlook - Options - access through programin is marked on don't show warnings. I added the next entries in regedit Key: HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\ <version>\Outlook\Security Value name: AdminSecurityMode Value type: REG_DWORD Value:

Sending an Email from Excel when Outlook not available using VBA

倾然丶 夕夏残阳落幕 提交于 2021-02-10 14:33:39
问题 I want to send stakeholders an e-mail when a subordinate makes any updates in the Excel worksheet. I hope to use a Workbook_BeforeSave event where an e-mail is triggered from the subordinate's Outlook account. The subordinate/user needs Outlook configured/installed in their system. If not mail wont be triggered. Is there any way to overcome this, like sending the mail triggering request to a remote computer/server where Outlook is preconfigured and sending the mail from that computer/server

How do you underline, bold and italicized certain portions of text within a range for each cell?

泪湿孤枕 提交于 2021-02-10 14:33:27
问题 I am trying to underline, bold and italicized certain portions of text within a cell. My first line of text starts at line 2, where I am trying to bold the second and third line of this cell. The last part of line 2, I am trying to italicized this. Line 5 needs to be underlined. I have a list of these that I am trying to go through, so I started with a 'for loop'. I can get the first two lines to be bold, but I have trouble getting the italic and underline portion right. Here's what I'm

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