Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do I understand this correctly?
There is one sheet A, so if function one() opens sheet A, then calls another function two() which also opens sheet A, there shouldn't be a problem. Right? When two()returns, one() should still have the same "handle" to the sheet and should still be able to work with it. But something is up. VBA is losing its brains somewhere. All of a sudden simple range assignments fail on sheet A, but also on other sheets. If I try and investigate and expand the sheet expression in the Locals window, Outlook tries to install! If I just go ahead and ignore the error (hit continue) everything seems to work just fine. Again, about instantiating multiple "handles" on a single sheet. That should be ok? (I'm not 100% that this is causing the problem, but first things first.) Thank you Xcel 2010, xp |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
oldyork90 has brought this to us :
Do I understand this correctly? There is one sheet A, so if function one() opens sheet A, then calls another function two() which also opens sheet A, there shouldn't be a problem. Right? When two()returns, one() should still have the same "handle" to the sheet and should still be able to work with it. But something is up. VBA is losing its brains somewhere. All of a sudden simple range assignments fail on sheet A, but also on other sheets. If I try and investigate and expand the sheet expression in the Locals window, Outlook tries to install! If I just go ahead and ignore the error (hit continue) everything seems to work just fine. Again, about instantiating multiple "handles" on a single sheet. That should be ok? (I'm not 100% that this is causing the problem, but first things first.) Thank you Xcel 2010, xp Based on your explanation, *sheets* are located in *workbooks*. Workbooks are opened, sheets are activated. What you're saying here is that you are opening sheets when what I think you really mean is you're opening workbook[s] and trying to reference specific sheets in the open workbook[s]. It would be much easier to help you if you post the actual code for both *one()* and *two()*. -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() GS wrote: oldyork90 has brought this to us : Do I understand this correctly? There is one sheet A, so if function one() opens sheet A, then calls another function two() which also opens sheet A, there shouldn't be a problem. Right? When two()returns, one() should still have the same "handle" to the sheet and should still be able to work with it. But something is up. VBA is losing its brains somewhere. All of a sudden simple range assignments fail on sheet A, but also on other sheets. If I try and investigate and expand the sheet expression in the Locals window, Outlook tries to install! If I just go ahead and ignore the error (hit continue) everything seems to work just fine. Again, about instantiating multiple "handles" on a single sheet. That should be ok? (I'm not 100% that this is causing the problem, but first things first.) Thank you Xcel 2010, xp Based on your explanation, *sheets* are located in *workbooks*. Workbooks are opened, sheets are activated. What you're saying here is that you are opening sheets when what I think you really mean is you're opening workbook[s] and trying to reference specific sheets in the open workbook[s]. It would be much easier to help you if you post the actual code for both *one()* and *two()*. -- Garry Thanks Garry. Yes I meant reference when I used handle. I've done some experimenting and it appears you may use as many references to a sheet as u want. Something else is going on. I'll pound my head for awhile. The opening of outlook when trying to explode the sheet name is really weird. Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
oldyork90 wrote :
GS wrote: oldyork90 has brought this to us : Do I understand this correctly? There is one sheet A, so if function one() opens sheet A, then calls another function two() which also opens sheet A, there shouldn't be a problem. Right? When two()returns, one() should still have the same "handle" to the sheet and should still be able to work with it. But something is up. VBA is losing its brains somewhere. All of a sudden simple range assignments fail on sheet A, but also on other sheets. If I try and investigate and expand the sheet expression in the Locals window, Outlook tries to install! If I just go ahead and ignore the error (hit continue) everything seems to work just fine. Again, about instantiating multiple "handles" on a single sheet. That should be ok? (I'm not 100% that this is causing the problem, but first things first.) Thank you Xcel 2010, xp Based on your explanation, *sheets* are located in *workbooks*. Workbooks are opened, sheets are activated. What you're saying here is that you are opening sheets when what I think you really mean is you're opening workbook[s] and trying to reference specific sheets in the open workbook[s]. It would be much easier to help you if you post the actual code for both *one()* and *two()*. -- Garry Thanks Garry. Yes I meant reference when I used handle. I've done some experimenting and it appears you may use as many references to a sheet as u want. Something else is going on. I'll pound my head for awhile. The opening of outlook when trying to explode the sheet name is really weird. Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion Like I said.., show us your code! -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi,
do you save your files in the format xlXMLSpreadsheet? http://msdn.microsoft.com/en-us/libr...lfileformat#Y0 isabelle Le 2012-10-25 17:59, oldyork90 a écrit : GS wrote: oldyork90 has brought this to us : Do I understand this correctly? There is one sheet A, so if function one() opens sheet A, then calls another function two() which also opens sheet A, there shouldn't be a problem. Right? When two()returns, one() should still have the same "handle" to the sheet and should still be able to work with it. But something is up. VBA is losing its brains somewhere. All of a sudden simple range assignments fail on sheet A, but also on other sheets. If I try and investigate and expand the sheet expression in the Locals window, Outlook tries to install! If I just go ahead and ignore the error (hit continue) everything seems to work just fine. Again, about instantiating multiple "handles" on a single sheet. That should be ok? (I'm not 100% that this is causing the problem, but first things first.) Thank you Xcel 2010, xp Based on your explanation, *sheets* are located in *workbooks*. Workbooks are opened, sheets are activated. What you're saying here is that you are opening sheets when what I think you really mean is you're opening workbook[s] and trying to reference specific sheets in the open workbook[s]. It would be much easier to help you if you post the actual code for both *one()* and *two()*. -- Garry Thanks Garry. Yes I meant reference when I used handle. I've done some experimenting and it appears you may use as many references to a sheet as u want. Something else is going on. I'll pound my head for awhile. The opening of outlook when trying to explode the sheet name is really weird. Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ps/ it is true that with all these formats, it is easy to get lost !
|
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() isabelle wrote: ps/ it is true that with all these formats, it is easy to get lost ! Went back and removed all selects (mostly from lazy macro pasting) and problem is solved. Damn. New rule for me - no select. The pasted macro were so busy that I suspect something there. Anyway, this seemed the best way to fix this. The book was saved xlsm. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Right-mouse open a 2nd file to a particular sheet that correspondswith a 1st file's sheet | Excel Programming | |||
ON OPEN VBA Code input incorrectly now excel sheet wont open | New Users to Excel | |||
why, when i open a work sheet does a blank sheet open as well | Excel Discussion (Misc queries) | |||
Search open sheets in workbook and insert into open sheet | Excel Discussion (Misc queries) | |||
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet | Excel Programming |