excel-vba-mac

Excel VBA addPicture by path to image

浪子不回头ぞ 提交于 2020-06-17 08:08:01
问题 I've written an VBA Macro on windows. This Macro adds pictures into my excel sheet based on the value of a cell e.g. 'image.png'. These images are located in the same directory as my Excel workbook. VBA will get the path to the workbook and use it to find the image specified in the cell. This works on windows, however it does not work on mac. The macro returns an error (1004) saying it can't find the specified file. Sub InsertImage() Dim useless As Double Dim clTop As Double For Each c In

Excel VBA addPicture by path to image

随声附和 提交于 2020-06-17 08:05:19
问题 I've written an VBA Macro on windows. This Macro adds pictures into my excel sheet based on the value of a cell e.g. 'image.png'. These images are located in the same directory as my Excel workbook. VBA will get the path to the workbook and use it to find the image specified in the cell. This works on windows, however it does not work on mac. The macro returns an error (1004) saying it can't find the specified file. Sub InsertImage() Dim useless As Double Dim clTop As Double For Each c In

How can I retrieve JSON from an HTTP endpoint, from within Excel on MacOS, and parse it?

醉酒当歌 提交于 2020-04-07 16:34:33
问题 I have seen How can I send an HTTP POST request to a server from Excel using VBA? and the MacOS-friendly response that describes how to retrieve data from an HTTP endpoint using QueryTables. It demonstrates how to retrieve a single string and stuff it into a cell. All good. Now I would like to retrieve more than a single value. It's a large JSON string, and I want to post-process it within Excel VBA before populating one or more cells. How is this possible? I can think of one way - place the

Can't access object from collection

∥☆過路亽.° 提交于 2020-03-05 03:24:26
问题 Apologies for what is no doubt a simple question - am very new to coding so even finding the answer from existing information is tough. Anyway... I've defined a Class with 4 value (1 x Single, 1 x String (to use as key), and 2 x Range) I've then managed to set the Collection based on the class and populate the collection, and can use Debug.Print to print the entire collection's values and also to count the number of items in the collection. But I can't access a single object from the

“Object doesn't support this action” for a drop down menu in Excel 2011 (Mac OS X)

本秂侑毒 提交于 2020-01-14 14:12:38
问题 I have a big Excel Workbook made with Office 2010 with some VBA code. Everything seems to work fine apart the drop down menus. Precisely, they work, graphically, but Me.Shapes("Drop Down 1").ControlFormat throws an "Object doesn't support this action" error (I am sure that "Drop Down 1" is the correct name, etc.), precisely, it gets referenced correctly (e.g. shape = Me.Shapes(1) works) but it doesn't seem to like ControlFormat . Google doesn't help much; any suggestions? I'm quite new to VBA

The MacScript function is not working well in Office for Mac 2016! Any ideas?

大憨熊 提交于 2020-01-09 07:58:07
问题 My macros use MacScript heavily, but it doesn't seem to be working in any of latest Office for Mac 2016 preview builds 回答1: The MacScript command, used to support inline Apple Scripts in Office for Mac 2011, is being deprecated. Due to restrictions of the sandbox, the MacScript command can no longer invoke other applications such as the Finder. Therefore we discourage the use of this command. For cases which require changing your existing code so it doesn’t use MacScript , you can use the

Create a folder and sub folder in Excel VBA

限于喜欢 提交于 2020-01-09 06:16:05
问题 I have a pull down menu of companies that is populated by a list on another sheet. Three columns, Company, Job #, and Part Number. When a job is created I need a folder for said company and a sub-folder for said Part Number. If you go down the path it would look like: C:\Images\Company Name\Part Number\ If either company name or Part number exists don't create, or overwrite the old one. Just go to next step. So if both folders exist nothing happens, if one or both don't exist create as

Count the cells value by different color specified

ぃ、小莉子 提交于 2019-12-25 05:04:55
问题 Please need your help on count the cells value by different color specified. In one sheet, some cells filled with red color , some cells filled with blue color , some cells filled with green color . The output should be cells count red color, cells count of blue color and cells count of green color separately. This is what I've tried: Function CountByColor(InputRange As Range, ColorRange As Range) As Long Dim cl As Range TempCount As Long ColorIndex As Integer ColorIndex = ColorRange.Cells(1,

Excel 2011 VBA Documentation

廉价感情. 提交于 2019-12-25 04:51:12
问题 I have used VBA in various Office products on Windows but this is my first attempt on Mac (OS vsn 10.8; Excel version 14.3.8; Microsoft Visual Basic version 14.3.8. I can't find any documentation on the parameters and descriptions of the properties and methods of Excel-specific objects (like Range). Through the HELP function I can get to some information on VBA in general but not the Excel-specific information. Several sources provide URLs that point into MSDN where I can find general

copy and paste the data one excel to another excel based on column name include blank cells

荒凉一梦 提交于 2019-12-25 04:21:38
问题 I am just trying to pull the data from one excel to another excel based on column name. Source excel name is "iTerm Export.xls". Sheet name is "export(1)". column heading is "Asset". so when run the below macro Asset column datas has to be copy and paste into the other excel i.e("iTerm metrics Report.xlsx") But my issue if there is a blank cell anywhere in the Asset column, Ex: there are 50 data rows in Asset column. But 25th and 30 is a blank cell. when i am running the macro once 24 rows