Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default Error on Macro code line change

Hi all, I have code line (see below) in my macro

Const AN As String = "C:\My Documents\Pic\AN.jpg"

I want to change this above line into the code line (see below) but I
get error message with the below code line. Please can any friend can
tell that what I am doing wrong.

Const AN As String = Thisworkbook.path & "\AN.jpg"
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Error on Macro code line change

Just declare it as variable

Dim AN As String

An = Thisworkbook.path & "\AN.jpg"

--
__________________________________
HTH

Bob

"K" wrote in message
...
Hi all, I have code line (see below) in my macro

Const AN As String = "C:\My Documents\Pic\AN.jpg"

I want to change this above line into the code line (see below) but I
get error message with the below code line. Please can any friend can
tell that what I am doing wrong.

Const AN As String = Thisworkbook.path & "\AN.jpg"



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro code to put series name next to individual line in line grap Otani Charts and Charting in Excel 3 February 23rd 10 07:24 PM
Change A Line in A Module Using VBA Code derrick Excel Programming 1 July 3rd 08 02:01 PM
keep track of last code line before error RB Smissaert Excel Programming 11 January 21st 06 01:28 AM
Change reference style in line of code Biff Excel Programming 6 September 10th 05 10:29 PM
Way to change a single line of vb code in several hundred excel files? Alex[_13_] Excel Programming 0 December 15th 03 06:13 PM


All times are GMT +1. The time now is 10:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"