Thread: Macro Help
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Carim[_3_] Carim[_3_] is offline
external usenet poster
 
Posts: 137
Default Macro Help

Hello Celt,

I am glad to hear you are making good progress ...!!!
As far the last cell is concerned, if you are using xl2000, there is
sometimes a bug related to spreadsheet formatting, with the instruction
xlCellTypeLastCell, which is used to identify the "bottom end" cell.
However, with worksheets which have been extensively manipulated,
sometimes this function gets corrupted.
Two tiny recommendations :
1. Insert a new worksheet, in which you copy paste all the cells of the
worksheet you are currently using ... Then, in this newly created
worksheet hit "end" "home" to visualize where Excel jumps to ... it
should be the clean last cell ... if so ... in VB, don't forget to copy
your private modules from the old to the new worksheet and then get rid
of your old worksheet ...
2. To be on the safe side, in your macro just before the line
Selection.SpecialCells(xlCellTypeLastCell).Select
go and insert the following line
ActiveSheet.UsedRange

Go ahead and test your updated macro in your new worksheet ...
everything should be fine ...
If some reason, it does not fix your problem , do not hesitate to drop
me a line ...

HTH
Cheers
Carim