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: 1
Default WORKDAY #NAME? Problem - tried the toolpack already

Hello!

I´m trying to programatically edit an excel worksheet with VBA, ill
copy part of my code below , maybe its better to understand:

Set x = CreateObject("Excel.Application")

If fs.FileExists(strCaminho & "Indices.xls") Then

x.Workbooks.Open (strCaminho & "Indices.xls")
x.ActiveSheet.Rows("1:1").Delete
x.ActiveSheet.Range("2:2").Delete
x.ActiveSheet.Range("A1:AA65536").Value =
x.ActiveSheet.Range("A1:AA65536").Value
Kill strCaminho & "IndicesNegoc.xls" 'deleta o arquivo antigo
existente
x.ActiveWorkbook.SaveAs fileName:=strCaminho &
"IndicesNegoc.xls", FileFormat:=xlNormal
x.Worksheets("MOEDAS UTILIZADAS PARA REVERSÃO").Activate 'muda
de worksheet
x.ActiveSheet.Rows("3:3").Delete 'deleção de linhas
desnecessárias
x.ActiveSheet.Range("4:4").Delete
x.ActiveSheet.Range("1:1").Delete
x.ActiveSheet.Range("1:1").Delete
x.ActiveSheet.Range("A1:AA65536").Value =
x.ActiveSheet.Range("A1:AA65536").Value
Kill strCaminho & "IndicesReversao.xls"
x.ActiveWorkbook.SaveAs fileName:=strCaminho&
"IndicesReversao.xls",FileFormat:=xlNormal
x.Quit
Set x = Nothing


As you can see, im just deleting the first lines, then i copy the
values from Indices.xls (not the formula) and paste it, then I save as
IndicesNegoc.xls. And i do the same thing with another worksheet saving
as Indices Reversao.xls. When i open IndicesNegoc.xls all the cells
that used workday function appears as #NAME?
and ive already checked if the add-in is installed. Its ok.
What should I do to solve this problem? Thank you

 
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
Add no. of days to a workday to get new workday? blswes Excel Worksheet Functions 1 April 15th 10 07:39 PM
DATE WORKDAY PROBLEM XLtest Excel Discussion (Misc queries) 3 January 11th 10 02:08 PM
Workday Problem Lee C Excel Discussion (Misc queries) 4 December 18th 08 10:17 PM
Problem using analysis toolpack when automatically running excel Dave Gruzewski Excel Programming 1 February 14th 05 06:39 PM
Problem using analysis toolpack when automating EXCEL Dave Gruzewski Excel Programming 1 February 14th 05 06:37 PM


All times are GMT +1. The time now is 04:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"