![]() |
|
#4
|
|||
|
|||
|
Wow this was certainly informational. I am sure you thought of this solution but I will post what I would do so others reading this forum can see.
I don't think there is a way to get just the integer value from a name since I believe a name is always a string. This can be verified by trying a Shape Name. I tried entering a shape with the name 6 but it still goes to "6". I think that names have to be strings so they can be referred to in any MS program. Similar to if you use a mid formula on group of numbers it now becomes a string and you have to add 0 to it to bring it back to a number. Good ol' data types. Here is the solution I would suggest that you could put at the beginning of your Sub and then you can use the same variable name throughout your code. Code:
SalChk = Mid(ThisWorkbook.Names("SalChk"), 2) + 0
SalCln = Mid(ThisWorkbook.Names("SalCln"), 2) + 0
SalCrew = Mid(ThisWorkbook.Names("SalCrew"), 2) + 0
SalMech = Mid(ThisWorkbook.Names("SalMech"), 2) + 0
SalPilot = Mid(ThisWorkbook.Names("SalPilot"), 2) + 0
SalSpv = Mid(ThisWorkbook.Names("SalSpv"), 2) + 0
If anybody else finds out different please let us all know. Thanks |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Way to search for a string in text file, pull out everything until another string?
|
omahadivision | Excel Programming | 12 | 11-23-2013 12:10 PM |
| Replace contents form 1 workbook with another based on simular data | shabbaranks | Excel | 1 | 12-05-2012 11:11 PM |
macro to transfer data from one workbook to another workbook
|
virsojour | Excel Programming | 5 | 02-01-2011 08:58 PM |
| inserting a string of data into an MS Word table??? | matto | Word VBA | 0 | 07-16-2010 09:35 AM |
How do I merge data from one sheet in a workbook out into multiple sheets
|
nolesca | Excel | 4 | 06-07-2010 08:13 AM |