GS wrote:
Sub whereAmI()
Cells(1, 1).Value = ActiveWorkbook.Path
End Sub
Just a minor point, but depending on context it's a very important point!
VBA 'best practice' suggests:
- use ActiveWorkbook only when the code is acting on or referencing a
workbook other than itself;
- use ThisWorkbook when code refs the workbook running the code.
Good point.
I figured since you program in other languages that you'd pick up on the 'This'
part of an object ref-ing itself!
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion