LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
RaY RaY is offline
external usenet poster
 
Posts: 164
Default Add workbook & save immediately (& 2 related questions)

First, thanks to Chip Pearson for the "posting tips" info -- very helpful!

I'm relatively new to VB for Excel, but have learned ALOT from this forum
and J-Walk's "Power Programming with VBA" ..... however, a couple of fairly
basic (I think) questions keep popping up for me.

Oh yeah, I'm using Excel2002 on an XP computer.... ;)
Here are my 3 issues:
1) As part of a much larger project, I need to Add a new workbook and save
it immediately with a specific name. I know how to add the workbook and how
to specifiy the name (shortcut requested below) but how do I identify the new
workbook to be saved? I've tried this code, but it didn't work:
Workbook.Add
ActiveWorkbook.SaveAs......
If I need to specify which workbook to save, how do I identify it? If the
end-user has been working for a while, the new workbook may have name
'Book15' (or whatever).

2) I need a shortcut and I can't find Help with this anywhere....how do I
'combine' 2 variables into ONE? I've tried this but it didn't work:
Dim Path as String; Dim Yw as String; Dim FileName as String
Path = .....
Yw = .......
FileName = Path & Yw
What am I doing wrong?

3) OK, this one isn't really related, except in my project ;)
I'm copying data from one workbook to a new one. In the orig workbook,
the title of the worksheet uses the worksheet tab name. When this info is
pasted into a new workbook, I want the tab name to reflect the worksheet
title (data in cell D1). I know the code to do this .... but how do I insert
this code automatically into the New workbook using VBA?

Any/all help is greatly appreciated .... I look forward to being able to
help others at some point!

rgds, ray


 
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
2 questions! Related to combobox and time function. HELP!! Bruno Excel Discussion (Misc queries) 11 September 28th 07 02:33 PM
Questions related to Online Quiz rajpalmanish Excel Programming 0 January 19th 06 03:19 AM
A couple RTD related questions, plus VBA timer object blindbl Excel Programming 4 May 9th 05 03:41 AM
Change cell value immediately after a save Bob Phillips[_5_] Excel Programming 0 August 8th 03 01:27 PM
Change cell value immediately after a save Bob Phillips[_5_] Excel Programming 0 August 8th 03 01:26 PM


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