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 Excel 2007 (Beta) - strange behavior of macro

I have written a small macro which gives names to cells. It ran fine in Excel
2003, but behaves strange in 2007 beta.

For sor = 2 To 43
Name = Cells(sor, 1)


Cellanev1 = "=Rikishi!R" & sor & "C17"
....
Cellanev11 = "=Rikishi!R" & sor & "C29"


Ujnev1 = Nev & "_gyoz"
....
Ujnev11 = Nev & "_yusho"


Cells(sor, 17).Select
ActiveWorkbook.Names.Add Name:=Ujnev1, RefersToR1C1:=Cellanev1
....
Cells(sor, 29).Select
ActiveWorkbook.Names.Add Name:=Ujnev11, RefersToR1C1:=Cellanev11

Next sor


For being shorter, I deleted some lines, but I think it's clear this way,
too. So, in Excel 2003 it ran fine through the lines ("sor") and gave name to
each cell. But now, in 2007, the macro runs, and gives name to the first
given cell, and leaves the rest. If I run it again, it names the second cell.
A third run results a name for the third cell, etc. When I run the macro from
VBA Editor step by step with F8, then it does its job fine. Any solution? Or
is it simply a bug of beta? Hm, well, I sincerely hope they have fixed it in
the final version.
 
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
Strange Excel behavior please Help FcoMariscal Excel Discussion (Misc queries) 1 July 19th 08 08:22 PM
Excel 2007 strange behavior on two computer kurlisue Excel Discussion (Misc queries) 1 April 21st 08 09:21 PM
Excel Mac OS X - Strange Behavior BrianP Excel Discussion (Misc queries) 0 January 1st 06 08:07 AM
Strange Personal Macro Workbook Behavior stretch Excel Discussion (Misc queries) 4 August 4th 05 07:39 PM
Strange macro behavior! davegb Excel Programming 9 May 20th 05 10:50 PM


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