I want to set the format of a cell same as the another
by using vba code.How can I do that?
Thanks!
--
I want to set the format of a cell same as the another
by using vba code.How can I do that?
Thanks!
--
Are you familiar with recording macros in Excel? By simply recording yourself doing anything in excel, it produces the code required to reproduce those actions via VBA. Therefore, you could record yourself right-clicking on the cell, selecting Format Cell... from the pop-up menu and set the cell's format according to what the original cell's format is, then, once finished, stop recording and retrieve the newly produced code. Another way could be to record yourself copying the source cell, pasting that to the destination cell, et voila! By copying and pasting via macro, you get the desired format of the cell. See what I mean?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks