excel-vba

VBA to click web button with dynamic elementID and repetitive class

我只是一个虾纸丫 提交于 2020-01-06 06:06:15
问题 I am quite new to VBA/html, trying to automate filling a form, but cannot even call it ... I searched the web for weeks tried many different code combinations, but none got me there. The HTML code/element looks like this: div title:"TextText" class:"text-truncate mb-2" id="abc_sidebar_startmenuitem" data-type="record" data-appid="82" data url="index.cfm?Xxx=&Yyy="> i class="fa icon-app-82 mr-1 fa-fw">/i> span class="clickable" id="ext-eng123">Text/span> /div> Problem is that class="clickable"

Copy and paste Whole Story from Word to Excel

老子叫甜甜 提交于 2020-01-06 06:05:58
问题 I have a Word document that is received periodically that needs to be combined with other data already in Excel as part of a larger output. I can copy and paste the whole document (WholeStory) from Word into Excel, but I want to make this part of the whole Excel output macro. My current code for this portion is below, and it works fine except that it pastes nothing. There is no data to paste when it gets there, so I guess it is either not picking it up to start with or not carrying it over.

Transferring one sheet information to another

牧云@^-^@ 提交于 2020-01-06 06:05:47
问题 I have an dropped down list with the names of different sheets. I would like to make it such that when I select the appropriate name in sheet, the contents of another sheet is shown on sheet1. Is anyone familiar with such a code or if it is possible? It is actually many hidden sheets of recipes where the user can view the different recipes all in one sheet whichever the user selects. The format of the recipes can be assumed to be the same. Any help is much appreciated. Thank you. 回答1: To make

Transferring one sheet information to another

 ̄綄美尐妖づ 提交于 2020-01-06 06:05:07
问题 I have an dropped down list with the names of different sheets. I would like to make it such that when I select the appropriate name in sheet, the contents of another sheet is shown on sheet1. Is anyone familiar with such a code or if it is possible? It is actually many hidden sheets of recipes where the user can view the different recipes all in one sheet whichever the user selects. The format of the recipes can be assumed to be the same. Any help is much appreciated. Thank you. 回答1: To make

How to copy a cell & paste it to multiple cells in Excel VBA Macro

我只是一个虾纸丫 提交于 2020-01-06 05:56:06
问题 I want to copy the amount and paste it to all empty cells above the amount as shown in the picture , using VBA or Macro in MS Excel Edit: This is what I done it. Sub Macro2() Range("F5").Select Selection.Copy Range("F2:F4").Select ActiveSheet.Paste Range("F7").Select Application.CutCopyMode = False Selection.Copy Range("F6").Select ActiveSheet.Paste Range("F12").Select Application.CutCopyMode = False Selection.Copy Range("F8:F11").Select ActiveSheet.Paste End Sub This code only works on this

VBA Nested If, Then, Else Loop That Copies Non-Matching Entries

懵懂的女人 提交于 2020-01-06 05:51:11
问题 I have some code here I have done to match a range of cells on one sheet(CRD), compare them to a range of cells on another sheet(PRD), and highlight the cells in column A of the first sheet(PRD) that have a matching range. I also want to copy and paste the range in column A of the first sheet(CRD) for ranges that do not match the second sheet(PRD) onto a third sheet(Sheet 1). I am sure it is my structure of the ends and exits and next statements I am using but I can not figure this out after

VBA - Run-time error '1004'

自闭症网瘾萝莉.ら 提交于 2020-01-06 05:43:06
问题 A bit of context, this is my first time programming using VBA in excel, and I'm trying to create a form that fills out a spreadsheet. I'm currently getting the error message: "Run-time error '1004': Method 'Worksheets'of object '_Global' failed I've searched online and have tried various solutions, but I think basically it comes down to a lack of understanding on my part. Private Sub CommandButton1_Click() 'When pressing save, save values in spreedsheet locations ActiveSheet.range("c8").Value

Excel VBA - filter by date

╄→гoц情女王★ 提交于 2020-01-06 05:37:05
问题 I'm trying to write a VBA to filter a file. I filtered it for Field 5 and 8 but i also want field 7 to filter for date - i want the file to show all lines that are today + 14 day and filter the rest. thanks Sub Filter() ' Sheets("CP").Select Range("a3:d" & Cells(Rows.Count, "e").End(xlUp).Row).AutoFilter Field:=5, Criteria1:="Plan" Range("a3:d" & Cells(Rows.Count, "e").End(xlUp).Row).AutoFilter Field:=18, Criteria1:="No" End Sub 回答1: Please try. Range("a3:d" & Cells(Rows.Count, "e").End(xlUp)

Access web page body text using VBA & Selenium

被刻印的时光 ゝ 提交于 2020-01-06 05:25:20
问题 I am trying to convert an Excel macro that currently uses Internet Explorer and use the following line of code to extract the web page’s <body> text x = .Document.DocumentElement.InnerText Using the Selenium demo, I am able to produce a jpg of the page with Chrome & IE , but Firefox just loads a blank page and IE64 & Edge don’t work on Windows 10. I have been unable to find the proper VBA command with Selenium to copy the body text to variable ”x”. I only want to read it. I am trying to do

Excel macro to select and cut multiple rows to a new worksheet

五迷三道 提交于 2020-01-06 04:31:31
问题 I run a report every week and would like to cut the rows for a particular date range into a new worksheet (i.e. all rows with transactions between the 16th of one month to the 15th of the following month). I'd like to cut all rows between 07/16 and 08/15 and past them in a new worksheet called "Aug" And cut all rows between 08/16 and 09/15 and past them in a new workseet called "Sept" Example data Column A - Column B - Column C Post Date - Name - Vendor 07/25/10 - Wilson - Starbucks 08/05/10