excel-vba

Excel VBA PUT Json

烂漫一生 提交于 2020-01-15 12:21:44
问题 How can I make this work now? I'm trying to get the value from Column Y (rng1) and also the value from Column Z (rng2) Dim xhr As Object, thisRequest As String, rng1 As Range, rng2 As Range Set xhr = CreateObject("Microsoft.XMLHTTP") With ThisWorkbook.Worksheets("Fulcrum Upload") For Each rng1 In .Range("Y3:Y" & .Cells(.Rows.Count, "Y").End(xlUp).Row).SpecialCells(xlVisible) For Each rng2 In .Range("Z3:Z" & .Cells(.Rows.Count, "Z").End(xlUp).Row).SpecialCells(xlVisible) If Not IsEmpty(rng1)

VBA: Run-Time Automation Error - “Code execution has been interrupted”

亡梦爱人 提交于 2020-01-15 12:06:14
问题 I'm attempting to write a program to loop through a directory of excel files and copy a range into a "Master Workbook". When I run the program I am prompted with "Code execution has been interrupted". If I select continue the code will successfully run but then a "run-time error '-2147221080' Automation error" appears. The line that causes the error is: Set ws = wb.Worksheets("Project Log") My question is, why is this line causing the error and or is there a way to bypass the error prompt so

VBA: Run-Time Automation Error - “Code execution has been interrupted”

痞子三分冷 提交于 2020-01-15 12:05:16
问题 I'm attempting to write a program to loop through a directory of excel files and copy a range into a "Master Workbook". When I run the program I am prompted with "Code execution has been interrupted". If I select continue the code will successfully run but then a "run-time error '-2147221080' Automation error" appears. The line that causes the error is: Set ws = wb.Worksheets("Project Log") My question is, why is this line causing the error and or is there a way to bypass the error prompt so

VBA: Run-Time Automation Error - “Code execution has been interrupted”

主宰稳场 提交于 2020-01-15 12:02:02
问题 I'm attempting to write a program to loop through a directory of excel files and copy a range into a "Master Workbook". When I run the program I am prompted with "Code execution has been interrupted". If I select continue the code will successfully run but then a "run-time error '-2147221080' Automation error" appears. The line that causes the error is: Set ws = wb.Worksheets("Project Log") My question is, why is this line causing the error and or is there a way to bypass the error prompt so

VBA Active-X buttons getting bigger with every action

感情迁移 提交于 2020-01-15 11:49:08
问题 I have an Excel sheet containing multiple Active-X buttons. Whenever I click on a button/perform an action, the buttons will keep getting bigger with every action. Initially this didn't happen at my desk (laptop in dock with two big screens), but when I moved and used the program just on my laptop, it suddenly started happening. The only fix I found is to hard-wire the positions right in the code. I feel that there has to be a solution. Below is a sample of my code. Private Sub SpinButton1

Connect a slicer to ll pivot table

送分小仙女□ 提交于 2020-01-15 11:21:27
问题 Status Quo: I have an excel 2010 workbook with a worksheet named Data . All the pivot tables in the workbook draw from that sheet. I have another sheet named Board where all the slicers are, and every slicer is connected to all pivot tables in the workbook. Need: I have to overhaul the file quite often, adding some columns in Data and some more pivots and slicers. Of course, pivot cache won't update automatically. Therefor new pivots can't be associated to old slicers. Strategy: 1_ I'd like

Excel macro to save pptx as pdf; error with code

核能气质少年 提交于 2020-01-15 11:13:25
问题 I know that this question probably was asked x1000 times, but I've been struggling for the past 3 hours to covert pptx to pdf via excel vba (this is required for my report generator, and in order to keep layout clean ad tidy I've decided to use PowerPoint, because word constantly mess things up). Here's the code I'm using: Dim ppt As Object On Error Resume Next Set ppt = GetObject(, "PowerPoint.Application") If ppt Is Nothing Then Set ppt = CreateObject("PowerPoint.Application") End If On

Trying to use VBA variable in Access UPDATE Statement

隐身守侯 提交于 2020-01-15 11:11:43
问题 So as the title says I am trying to use a VBA variable within an update statement. This is being used because I want to loop through each cell in a range and subtract a value from the worksheet from a value within the table corresponding to that iterations cell reference. However, statement runs an error saying "too many parentheses." However, this is odd to me b/c I pulled the SQL syntax directly out of access. I guess I am missing something? I will post both versions of the code: Code with

Trying to use VBA variable in Access UPDATE Statement

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-15 11:07:33
问题 So as the title says I am trying to use a VBA variable within an update statement. This is being used because I want to loop through each cell in a range and subtract a value from the worksheet from a value within the table corresponding to that iterations cell reference. However, statement runs an error saying "too many parentheses." However, this is odd to me b/c I pulled the SQL syntax directly out of access. I guess I am missing something? I will post both versions of the code: Code with

Add cell string to another cell if 2 cells are the same for 2 rows

送分小仙女□ 提交于 2020-01-15 11:06:34
问题 I'm trying to make a macro that will go through a spreadsheet, and based on the first and last name being the same for 2 rows, add the contents of an ethnicity column to the first row. eg. FirstN|LastN |Ethnicity |ID | Sally |Smith |Caucasian |55555 | Sally |Smith |Native American | | Sally |Smith |Black/African American | | (after the macro runs) Sally |Smith |Caucasian/Native American/Black/African American|55555 | Any suggestions on how to do this? I read several different methods for VBA