Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compile error for macros
I am trying to create a macros to enter the filepath in
the footer of an excel document. Here is what MS Office's site said to create: Sub UpdateFooter() Sheet1.PageSetup.LeftFooter= ActiveWorkbook.FullName End Sub When I do this I get a compile error expected:expression. What am I doing wrong? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compile error for macros
This line of code should be on a single line
Sheet1.PageSetup.LeftFooter = ActiveWorkbook.FullNam -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compile error for macros
Michael,
The second and third line should be one line... Sheet1.PageSetup.LeftFooter = ActiveWorkbook.FullName When a line of code is split up, a line continuation character is needed. That would be a space followed by the underscore " _" (without the quote marks). Using the above the code line would look like... Sheet1.PageSetup.LeftFooter = _ ActiveWorkbook.FullName Regards, Jim Cone San Francisco, CA "MICHAEL" wrote in message ... I am trying to create a macros to enter the filepath in the footer of an excel document. Here is what MS Office's site said to create: Sub UpdateFooter() Sheet1.PageSetup.LeftFooter= ActiveWorkbook.FullName End Sub When I do this I get a compile error expected:expression. What am I doing wrong? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
help with this error-Compile error: cant find project or library | Excel Discussion (Misc queries) | |||
How do I get rid of "Compile error in hidden module" error message | Excel Discussion (Misc queries) | |||
Compile error in hidden module error | Excel Programming | |||
Debug/Compile: Compilng excel macros? What it generates? | Excel Programming |