LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default convert string to integer

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Varaibles as both integer and String RominallL Excel Programming 5 January 31st 07 06:33 PM
String or integer? JustinP Excel Programming 2 September 5th 06 06:56 AM
Compare string with integer hurriance[_8_] Excel Programming 2 June 26th 06 09:14 AM
Is there a function to convert a string representing an integer i. perin Excel Programming 1 October 6th 04 09:36 PM
How do I convert an integer variable to a string variable? dumbass Excel Programming 2 May 21st 04 07:34 PM


All times are GMT +1. The time now is 06:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"