Here what im trying to do (using excel vba)
/*all my work books are labeled WCSO#1(2013), WCSO#2(2013), WCSO#3,2013.....AND SO ON. (all in consecutive order) */
1. i want to search for a closed workbook
here's how the logic should perform the search:
(a) look at the current workbook and "get the name of the current workbook".
(b) using the "mid string function" MID( text, start_position, number_of_characters )
search the string and retrieve indexes in the 6th, 7th and 8th position "only if they are numbers and follow each other"
(and because do not want the numbers in the bracket to be counted in i.e.(2013).
the numbers in WCSO sheet begin at index 6.
(c) after the numbers are retrieved, place them in a string variable (for ex numString) then Convert them to an integer (numInt = CInt(numString))
then add one to the integer numInt (i.e. numInt = numInt +1)
then convert numInt back to a string (i.e. numStringNew= CStr(numInt) )
(d) Use the replace function (Replace ( string1, find, replacement ) to find and replace the previous string in the current workbook name.
I will copy the current workbook original string to a different variable.
(e) now place that string variable in (what ever formula you use to reference a closed workbook and its sheet and cells withi)
im not sure if this is ok but heres what ive got :
'i don't know how to open reference the sheet or the cells in range in the sheet
' i need to get the data (let says in cell A1:A50) and place it in my current workbook in the same range (i.e. Cells A1:A50)
Bookmarks