LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to work on a new worksheet

Im trying to work on a new worksheet using workbooks.add, but when i
try to put some data on this new workbook, the data fills the original
workbook, where my macro is.

this is my macro:

cenario = Sheet1.Range("cdimportacao")

Workbooks.Add

Dim hoje As Date
Dim sfilename As String

sfilename = Format(Now(), "ddmmyyyy")
hoje = Format(Now(), "dd/mm/yyyy")
data = "DATA"

Sheet1.Cells(1, 1).Value = data
Sheet1.Cells(1, 2).Value = hoje
Sheet1.Range("A1:E2545").Value = cenario

ActiveWorkbook.SaveAs Filename:="c:\place\" & sfilename, _
FileFormat:=xlText, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

Can someone help me with this? Appears to be basic.
 
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
Link one worksheet in a workbook to another worksheet in same work bjswise Excel Discussion (Misc queries) 1 February 6th 10 12:09 AM
Retrieving data into worksheet from another worksheet in same work Tasha Excel Discussion (Misc queries) 2 August 6th 09 03:51 PM
How does a module of VB work in a Worksheet? VJ Sharma[_2_] Excel Worksheet Functions 1 April 30th 09 04:15 PM
Copying the active worksheet to another worksheet in the same work queenmaam Excel Worksheet Functions 5 March 25th 08 06:56 PM
I need a work around for a protected worksheet Richard Setting up and Configuration of Excel 1 December 22nd 07 10:28 PM


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