excel,vba,excel-vba,excel-vba-mac
You could you the Application.InputBox() method to prompt the user to select 4 cells where they want to place the ship. Dim rngSelected As Range Dim sSelectedAddress As String Do On Error Resume Next Set rngSelected = Application.InputBox(Prompt:="Select 4 cells vertically or horizontally where you would like to place your...
excel,vba,excel-vba,excel-vba-mac
There are certain exceptional circumstances in which there is no choice but to use On Error Resume Next for flow control — but this isn't one of them. In this case it will just cause you pain. By moving your logic around a little bit, you can deal with the...
May be the following code can help you : I am just saving data into two dimensional array but before adding the data to array, using a check whether this data already exist in array or not. Sub test() Set ExcelApp = CreateObject("Excel.Application") Set wb = ActiveWorkbook Set ws =...
It looks like you are trying to use your path and filename variables inside a quoted string. Concatenate the variables into the quoted string. With Sheet1.QueryTables.Add(Connection:= _ "TEXT;" & fpath & Name, _ Destination:=Range("$A$1")) That should put the values of the variables into the string, not their variables names....
excel,osx,vba,excel-vba,excel-vba-mac
The Mac does not support the SearchFormat argument. Just omit and the code will run.
excel,vba,excel-vba,save,excel-vba-mac
Change the Const to a variable. By Definition, a Const(ant) can't change, but you are using it like a variable. Change it to these two lines: Dim FName As String FName = "HD:Users:User:Desktop:" & FileNumber & ".jpg" You should also declare FileNumber before you set it. Dim FileNumber As Long...
email,excel-vba-mac,apple-mail
Outlook for Mac 2011 (nor Apple Mail) does not support VBA. As far as I know automation of Outlook for Mac or Apple Mail can be accomplished using Applescript and/or Automator. See Introduction to Scripting Mail for more information.
excel,osx,vba,excel-vba,excel-vba-mac
After confirming in the comments, sometimes there's something funky that goes on when copy/paste'ing strings into the VB Editor. I had a feeling that you may have inadvertently copy and pasted dashboard.html but somehow also copied a newline character that came along for the ride, causing you odd issues when...