LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default GetOpenFilename

Application.GetOpenFilename doesn't open the file, it just returns the
filename that the user chose OR False, if the user canceled.

Is the book open when you try to assign the range ? if so, then you don't
need GetOpenFileName, if its not, then try

Set Rng = Workbooks.Open(Book).Worksheets("Sheet1").Range("A 1")

--
Regards

Juan Pablo González

"Roman" wrote in message
...
Here's my example:

Book = Application.GetOpenFilename
Set Rng = Workbooks(Book).Worksheet("Sheet1").Range("A1")

It results in error because GetOpenFilename returns a full file path, not
file name.
Is there a way to solve this?

Thanks



 
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
GetOpenFilename Jenny Excel Programming 2 October 22nd 04 01:38 PM
GetOpenFilename Todd Htutenstine Excel Programming 2 May 13th 04 03:14 PM
getopenfilename inquirer Excel Programming 1 December 3rd 03 11:37 AM
GetOpenFilename Hasan Cansü Excel Programming 0 September 24th 03 01:32 PM
Using GetOpenFilename Robin Seaby Excel Programming 2 August 6th 03 04:50 PM


All times are GMT +1. The time now is 01:54 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"