PDA

View Full Version : Solved: rd_filename = Active.Workbook.Name



velohead
07-20-2011, 09:26 PM
Hi All,

It's been a while since this beginner used VB, so go gently please.

The statement....
rd_filename = Active.Workbook.Name
....is not recognised by VB, it comes up with "run time error 424".

I assume (from looking at help) that the reason is that I need a fuller line of code, like Application.Active.Workbook.Name

Anyone know what this is, please.


Just for info, I want to....
do something in active file
capture filename from active file
goto a specific file and do something
then goto 1st file (hence need filename) and do something else


Thanks All.

velohead
07-20-2011, 09:41 PM
Solved. D'oh!

Bob Phillips
07-21-2011, 01:04 AM
I presume you used

rd_filename = ActiveWorkbook.Name

Please confirm fr the archive.

velohead
07-21-2011, 03:34 PM
Yes, that is correct.
I had inserted an unneccessary . character.