Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Martin,
Approach a ) should work, and it worked fine in my test. Making asking silly questions here, but does the template already have sheets named Report and Data? How did you run the code, versions a and b)? -- HTH RP (remove nothere from the email address if mailing direct) "Martin Skrenek" wrote in message ... Hi, i try to make a new workbook with two sheets named "Report" and "Data" and put a formula there. Public wbNew As Workbook Set wbNew = Application.Workbooks.Add(ActiveWorkbook.Path & "\new.xlt") ... a) wbNew.Worksheets("Report").Cells(1, 1).FormulaR1C1 = "=round(Data!R1C1,1)" b) wbNew.Worksheets("Report").Range("a1").FormulaR1C1 = "=round(Data!R1C1,1)" .. If I try to use a) with cells, in sheet there is is #name? error. When I use F2 for editting e cell and I press Enter (nothing changed), it's OK and calculates. When I use this approach in one workbook it works, but I use one workbook from anoher. If I try to use b) It works fine Does anymody know whats the problem? For me it's better to use cells property in my program. Thanks, Martin |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
vlookup-cell range in formula changes when copied to another cell | Excel Discussion (Misc queries) | |||
How can I make a blank cell in a formula cell with a range of cell | Excel Discussion (Misc queries) | |||
function problem regarding cell range | Excel Worksheet Functions | |||
Problem copying formula to range of cells | Setting up and Configuration of Excel | |||
Reference range in formula problem | Excel Programming |