Menu
  • HOME
  • TAGS

VBA - Excel VBA Set Horizontal & Vertical alignment

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...

Ignore “subscript out of range” error once, to deal with first iteration

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...

how to compare text values between cells in same column and give specific ID(number) in excel vba [closed]

excel,excel-vba,excel-vba-mac

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 =...

run time error 1004 in excel 2010 Refresh BackgroundQuery

excel,excel-vba-mac

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 Doc macro yields “Named argument not found (Error 448)”

excel,osx,vba,excel-vba,excel-vba-mac

The Mac does not support the SearchFormat argument. Just omit and the code will run.

Saving a file in excel in a location on the computer HD using VBA

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...

Create new mail on Mac using Excel VBA

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 for Mac VBA - Save as HTML adds an unexpected line break in file name

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...