View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
dkinn dkinn is offline
external usenet poster
 
Posts: 30
Default convert string to integer

Sorry for any mis-communications there, but sometimes that happens through
the NG's but glad to here that your problem is corrected.

I just enjoy seeing how varied the uses for excel really are and for me the
fun is helping to come up with answers when problems do arise.

Have a great day

David

"eugene" wrote:

Hi,

Simple question.

Part of my workbook has numbered sheets (1,2, etc. - it has others as well).
I would like to add sheets using a macro, calling them by the next number in
the sequence - eg if the last sheet is 10, the next sheets should be named
11, 12, etc. (Sheets.Count for the last sheet is not the same as its name
and can vary from workbook to workbook).

If I capture the name of the last sheet (Sheets.Name), the macro deals with
it as a string and thus I am encountering a problem raising its value. How
does one do arithmetic on a string or more specifically, how does one convert
a string into a number?

Conversely, how would one change a number into a string (not needed for
this macro, but generally useful to know)?

---
Eugene