Home |
Search |
Today's Posts |
#31
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not many people were interested in solving this problem...
But thank you Dave, you tried to be helpful a lot. "Dave Peterson" wrote in message ... I'm sorry, I'm out of guesses. Jack wrote: Hi Dave, I have already tried "all" portions of your code presented on this thread. As I mentioned earlier, I am not getting any error messages regarding to the "workbook beeing not opened" or "not having that spesific worksheet". The "subscript out of range error" is displayed on the: Set sh = bk2.Worksheets(cell.Offset(0, 1).Value) line of your code, which I beleive is down passed the control lines you are reminding. Hope you & other newsgroup members can help me find out the reason and cure the problem. Sincerely Jack "Dave Peterson" wrote in message ... This is the portion of code (from a few posts ago) that I suggested: Set wb1 = Nothing On Error Resume Next Set wb1 = Workbooks("all_data.xls") On Error GoTo 0 If wb1 Is Nothing Then MsgBox "all_data.xls isn't open!" Exit Sub End If Set wk1 = Nothing On Error Resume Next Set wk1 = wb1.Worksheets("sheet1") On Error GoTo 0 If wk1 Is Nothing Then MsgBox "all_data.xls doesn't have that sheet" Exit Sub End If If you have spelling mistakes or the workbook isn't open, then you'll get a message box to pop up. You could go back to the other post and see it in its entirety. Jack wrote: No, I do not know how to do that. <<snipped -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Split individual cells? | Excel Discussion (Misc queries) | |||
How do i split data into individual cells | Excel Discussion (Misc queries) | |||
write formula that icludes data from sheet 1 to sheet 2 of my spr | Excel Worksheet Functions | |||
Split numerical vales joinned by && into individual rows | Excel Discussion (Misc queries) | |||
Can I split worksheets from one workbook into individual workbooks | Excel Discussion (Misc queries) |