![]() |
Formatting Excel through VBA Coding
I have code that clears certain data, when I click on a button, the coding is
"Selection.Delete Shift:=xlUp". I then want to be be able to re-establish my borders, my word font type, and word font size, by way of some VBA coding. I have struggled with the For-Next Loop coding, but alas all of the cells remain blank after going through through the For-Next routine. I'm sure there is a simple coding for this, but I sure have found it as of yet. Thanks for reading |
Formatting Excel through VBA Coding
I forgot to include in my other message, that what I am trying to do is the
range of B8 through B57. Will not go higher then row 8, but I could go lower if the need is there. "caldog" wrote: I have code that clears certain data, when I click on a button, the coding is "Selection.Delete Shift:=xlUp". I then want to be be able to re-establish my borders, my word font type, and word font size, by way of some VBA coding. I have struggled with the For-Next Loop coding, but alas all of the cells remain blank after going through through the For-Next routine. I'm sure there is a simple coding for this, but I sure have found it as of yet. Thanks for reading |
Formatting Excel through VBA Coding
Hi caldog,
Try Selection.ClearContents, that way you won't have to reformat. Otherwise if you wish to continue as you are just record a macro of youself doing the formatting and run that. "caldog" wrote: I have code that clears certain data, when I click on a button, the coding is "Selection.Delete Shift:=xlUp". I then want to be be able to re-establish my borders, my word font type, and word font size, by way of some VBA coding. I have struggled with the For-Next Loop coding, but alas all of the cells remain blank after going through through the For-Next routine. I'm sure there is a simple coding for this, but I sure have found it as of yet. Thanks for reading |
Formatting Excel through VBA Coding
Thanks for the reply, it help me out. Problem is solved.
"Normek" wrote: Hi caldog, Try Selection.ClearContents, that way you won't have to reformat. Otherwise if you wish to continue as you are just record a macro of youself doing the formatting and run that. "caldog" wrote: I have code that clears certain data, when I click on a button, the coding is "Selection.Delete Shift:=xlUp". I then want to be be able to re-establish my borders, my word font type, and word font size, by way of some VBA coding. I have struggled with the For-Next Loop coding, but alas all of the cells remain blank after going through through the For-Next routine. I'm sure there is a simple coding for this, but I sure have found it as of yet. Thanks for reading |
Formatting Excel through VBA Coding
If desired, send your file to my address below along with this msg and
a clear explanation of what you want and before/after examples. -- Don Guillett Microsoft MVP Excel SalesAid Software "caldog" wrote in message ... I have code that clears certain data, when I click on a button, the coding is "Selection.Delete Shift:=xlUp". I then want to be be able to re-establish my borders, my word font type, and word font size, by way of some VBA coding. I have struggled with the For-Next Loop coding, but alas all of the cells remain blank after going through through the For-Next routine. I'm sure there is a simple coding for this, but I sure have found it as of yet. Thanks for reading |
Formatting Excel through VBA Coding
Don,
Thanks for the reply. With what Normek suggested, and a little trial and error on my part, I was able to get what I was after. Everything is now working just fine. "Don Guillett" wrote: If desired, send your file to my address below along with this msg and a clear explanation of what you want and before/after examples. -- Don Guillett Microsoft MVP Excel SalesAid Software "caldog" wrote in message ... I have code that clears certain data, when I click on a button, the coding is "Selection.Delete Shift:=xlUp". I then want to be be able to re-establish my borders, my word font type, and word font size, by way of some VBA coding. I have struggled with the For-Next Loop coding, but alas all of the cells remain blank after going through through the For-Next routine. I'm sure there is a simple coding for this, but I sure have found it as of yet. Thanks for reading |
All times are GMT +1. The time now is 01:22 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com