I am recording a simple macro that creates a data graph using two columns. When I run the macro code I keep getting the following error:
Run-time error '1004':
The formula you typed contains an error.• To get assistance in entering a function, click OK,then click Function on the Insert menu. • If you are not trying to enter a formula, avoid using an equal sign (=) or minus sign (-), or precede it with a single quotation mark (').
Here is the VB code:
Sub Macro4() ' ' Macro4 Macro ' ' Keyboard Shortcut: Option+Cmd+p ' Range("A1:B39").Select ExecuteExcel4Macro (FALSE,240,73) ActiveChart.SetSourceData Source:=Range("'5E627659 host-260'!$A$1:$B$39") End Sub
I'm running Excel 2016 for Mac. When I try the same thing on a Windows machine, it works.
Ans: Put a '.' before range and make sure that you should have an updated version.
ActiveChart.SetSourceData Source:=.Range("'5E627659 host-260'!$A$1:$B$39").
It will works fine
You cann even use this::
//ActiveChart.SetSourceData Source:=Sheets("Data").Range("'5E627659 host-260'!$A$1:$B$39")//
//Thank you//
I am recording a simple macro that creates a data graph using two columns. When I...
could you please help me with this problem, also I
need a little text so I can understand how you solved the
problem?
import java.io.File; import java.util.Scanner; /** *
This program lists the files in a directory specified by * the
user. The user is asked to type in a directory name. * If the name
entered by the user is not a directory, a * message is printed and
the program ends. */ public class DirectoryList { public static...