Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Opening a user selected workbook

Hi,

I have a large workbook that I use to analyse data that is put into several
sheets.
Rather than save the large workbook (which is several MB) I would like to
run a macro to copy and paste the input information into a new Data only
workbook. I will end up with many €śdata€ť workbooks but at least these are
less than a hundredth of the size. These Data only files would also permit
other people to update the data even though they do not have access to the
large workbook.
Then when that data is required it can be copied back into the large workbook.

I have the macros to do all the copy and pasting but do not know how to
prompt the user for naming the file in the first place or recalling the
desired file when the data is to be €śimported€ť.

My code at the moment refers - several times throughout its execution - to a
workbook of a particular name; in practice it needs to refer to the
€śselected€ť workbook.

Any ideas? Should I approach this in a different way?

Kind regards
David Hall
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Opening a user selected workbook

David,

You could use

fName = Inputbox("Supply file name")
if fName < "" Then
Activeworkbook.SaveAs filename:=fname
end if

but it would be better IMO to use the built-in functionality. Take a look at
GetSaveAsFileName in help. Read it carefully as it is not immediately
straight-forward.

--
HTH

-------

Bob Phillips
"David Hall" <David wrote in message
...
Hi,

I have a large workbook that I use to analyse data that is put into

several
sheets.
Rather than save the large workbook (which is several MB) I would like to
run a macro to copy and paste the input information into a new Data only
workbook. I will end up with many "data" workbooks but at least these are
less than a hundredth of the size. These Data only files would also permit
other people to update the data even though they do not have access to the
large workbook.
Then when that data is required it can be copied back into the large

workbook.

I have the macros to do all the copy and pasting but do not know how to
prompt the user for naming the file in the first place or recalling the
desired file when the data is to be "imported".

My code at the moment refers - several times throughout its execution - to

a
workbook of a particular name; in practice it needs to refer to the
"selected" workbook.

Any ideas? Should I approach this in a different way?

Kind regards
David Hall



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
SHow user form when opening workbook Wanna Learn Excel Discussion (Misc queries) 2 June 26th 07 06:30 PM
When opening a workbook, need to ensure user opens in a certain ce Gover Excel Discussion (Misc queries) 4 April 11th 07 03:06 PM
user cannot access his share workbook after opening network path. phil Excel Discussion (Misc queries) 0 September 26th 06 04:48 PM
Opening workbook in user-defined folder pdberger Excel Worksheet Functions 0 August 26th 05 04:09 PM
plotting chart with user selected range from current workbook annette2002 Excel Programming 0 June 5th 04 03:16 AM


All times are GMT +1. The time now is 01:57 AM.

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"