View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
B Roberson B Roberson is offline
external usenet poster
 
Posts: 26
Default Update this macro to make it generate a counter as text

That fixed it based on doing an istext() formula on the resulting fields. Surely now it will upload to my database in Alpha 5 correctly.


On Thursday, October 18, 2012 1:25:37 AM UTC-5, Claus Busch wrote:
Hi,



Am Wed, 17 Oct 2012 14:02:38 -0700 (PDT) schrieb B Roberson:



I got the leading zeros but I had trouble with it uploading to this database and had to go back and do a formula =istext() on the resulting cells and found that they were not actually text. So, my question is how do I get them to display like this but actually be text? I used an =text()sometimes to bring a number over as text. Is there an alternative to that here?




try:

With Range("D1:D" & cRows)

.Formula = "=text(row(),""000"")"

.Copy

.PasteSpecial xlPasteValues

End With





Regards

Claus Busch

--

Win XP PRof SP2 / Vista Ultimate SP2

Office 2003 SP2 /2007 Ultimate SP2