PC Review


Reply
Thread Tools Rate Thread

CELL Function in VBA ?

 
 
=?Utf-8?B?SmFrb2JzaGF2biBJc2JyYWU=?=
Guest
Posts: n/a
 
      20th Nov 2006
The formula
=CELL("filename",A1) gives me something like
C:\Documents and Settings\Owner\Desktop\[Book1.xls]Sheet1


in VBA
s = Application.WorksheetFunction.Cell("filename", A1)
does nothing. How can I get the same string in VBA that CELL() gives me in
the worksheet?

Thanks in advance for any help or suggestions.
--
jake
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      20th Nov 2006
Sub mypathis()
'MsgBox ActiveWorkbook.Path
'MsgBox ActiveWorkbook.Name
With ActiveWorkbook
MsgBox .Path & "\" & .Name
End With
End Sub


--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Jakobshavn Isbrae" <(E-Mail Removed)> wrote in
message news:3C652953-E808-4040-98C5-(E-Mail Removed)...
> The formula
> =CELL("filename",A1) gives me something like
> C:\Documents and Settings\Owner\Desktop\[Book1.xls]Sheet1
>
>
> in VBA
> s = Application.WorksheetFunction.Cell("filename", A1)
> does nothing. How can I get the same string in VBA that CELL() gives me
> in
> the worksheet?
>
> Thanks in advance for any help or suggestions.
> --
> jake



 
Reply With Quote
 
Doug Glancy
Guest
Posts: n/a
 
      20th Nov 2006
jake,

It doesn't look like Cell is a supported worksheet function.

Try using a combination of ActiveWorkbook.FullName and Activesheet.Name

hth,

Doug

"Jakobshavn Isbrae" <(E-Mail Removed)> wrote in
message news:3C652953-E808-4040-98C5-(E-Mail Removed)...
> The formula
> =CELL("filename",A1) gives me something like
> C:\Documents and Settings\Owner\Desktop\[Book1.xls]Sheet1
>
>
> in VBA
> s = Application.WorksheetFunction.Cell("filename", A1)
> does nothing. How can I get the same string in VBA that CELL() gives me
> in
> the worksheet?
>
> Thanks in advance for any help or suggestions.
> --
> jake



 
Reply With Quote
 
=?Utf-8?B?SmFrb2JzaGF2biBJc2JyYWU=?=
Guest
Posts: n/a
 
      21st Nov 2006
Don & Doug:

Thank you both very much.
--
jake


"Doug Glancy" wrote:

> jake,
>
> It doesn't look like Cell is a supported worksheet function.
>
> Try using a combination of ActiveWorkbook.FullName and Activesheet.Name
>
> hth,
>
> Doug
>
> "Jakobshavn Isbrae" <(E-Mail Removed)> wrote in
> message news:3C652953-E808-4040-98C5-(E-Mail Removed)...
> > The formula
> > =CELL("filename",A1) gives me something like
> > C:\Documents and Settings\Owner\Desktop\[Book1.xls]Sheet1
> >
> >
> > in VBA
> > s = Application.WorksheetFunction.Cell("filename", A1)
> > does nothing. How can I get the same string in VBA that CELL() gives me
> > in
> > the worksheet?
> >
> > Thanks in advance for any help or suggestions.
> > --
> > jake

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
ISBLANK function not working when cell is blank dut to function re mcmilja Microsoft Excel Misc 8 21st Jun 2008 04:13 PM
Changing a cell color inside a function called by that cell Wayne Erfling Microsoft Excel Programming 8 29th Jan 2007 01:55 AM
A correct IF function doesn't show the function's result in cell =?Utf-8?B?TWljaGFlbA==?= Microsoft Excel Misc 1 10th Apr 2006 09:10 AM
Can function in one cell change value or function in another cell? me Microsoft Excel Worksheet Functions 4 27th Feb 2006 01:04 PM
using the offset function to subtract a cell in b column from cell in a instead of adding mike Microsoft Excel Worksheet Functions 1 18th Oct 2004 08:44 AM


Features
 

Advertising
 

Newsgroups
 


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