ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to open a new workbook and rename the workbook? (https://www.excelbanter.com/excel-discussion-misc-queries/170746-how-open-new-workbook-rename-workbook.html)

pokdbz

How to open a new workbook and rename the workbook?
 
I need to know how to open a new workbook and then rename the workbook?

Kevin B

How to open a new workbook and rename the workbook?
 
Click FILE and select SAVE or press <CTRL + S
--
Kevin Backmann


"pokdbz" wrote:

I need to know how to open a new workbook and then rename the workbook?


pokdbz

How to open a new workbook and rename the workbook?
 
Sorry was trying to write VBA code for this.

I have Workbooks.Add but I cannot figure out how to rename the open Workbook.

"Kevin B" wrote:

Click FILE and select SAVE or press <CTRL + S
--
Kevin Backmann


"pokdbz" wrote:

I need to know how to open a new workbook and then rename the workbook?


Dave Peterson

How to open a new workbook and rename the workbook?
 
Workbooks are "renamed" by saving them.

So you'll have to use something like:

dim NewWkbk as workbook
set newwkbk = workbooks.add
newwkbk.saveas filename:="C:\whateveryouwanthere.xls", _
fileformat:=xlworkbooknormal


pokdbz wrote:

Sorry was trying to write VBA code for this.

I have Workbooks.Add but I cannot figure out how to rename the open Workbook.

"Kevin B" wrote:

Click FILE and select SAVE or press <CTRL + S
--
Kevin Backmann


"pokdbz" wrote:

I need to know how to open a new workbook and then rename the workbook?


--

Dave Peterson


All times are GMT +1. The time now is 10:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com