.insertlines automation error excel crash

Hi,
I'm having a quite strange problem in a VBA macro that I made that is 
driving me crazy. First of all, I am using Excel 2003.
Well, when I try to insert lines of code in vba worksheet "sheet1", I always 
get an Automation Error that causes the restart of excel. 
The precise error is:
"Automation Error. connection to type library or object library for remote 
process has been lost. Press OK for dialog ot remove reference."


The error always happens at the SECOND insertline instruction (the first 
line in sheet1 is written correctly) in the following code:

----...----

Set VBCodeModmej = 
ActiveWorkbook.VBProject.VBComponents(ActiveWorkbook.Worksheets("Sheet1").CodeName).CodeModule
VBCodeModmej.InsertLines 1, "Private Sub Worksheet_SelectionChange(ByVal 
Target As Range) "
VBCodeModmej.InsertLines 2, "Dim Touched As Range"
VBCodeModmej.InsertLines 3, "Dim void As String"
etc etc

---...---


Note that with Office 2007 this never happens ...!

I tried the following things, read here and there for the network (I tried 
them one at a time ...):
-Put option explicit: useless
-Put on error resume next: useless
-Put Instead of 'private sub' the string 'sub': useless
-Put Application.EnableEvents = True: useless
-Put Application.OnTime Now + TimeValue("00:00:10") before the Set line: 
useless


Can you help me somehow?

Thank you so much right now


Mark
0
Utf
4/16/2010 10:31:01 PM
excel.programming 6508 articles. 2 followers. Follow

14 Replies
1302 Views

Similar Articles

[PageSpeed] 17

You may find something here.

http://www.cpearson.com/excel/vbe.aspx

I've not done anything like what you are doing, but I wonder if you already 
have some lines in the code module and are trying to insert lines where some 
already exist.  Have you checked that?
-- 
HTH,

Barb Reinhardt



"perf" wrote:

> Hi,
> I'm having a quite strange problem in a VBA macro that I made that is 
> driving me crazy. First of all, I am using Excel 2003.
> Well, when I try to insert lines of code in vba worksheet "sheet1", I always 
> get an Automation Error that causes the restart of excel. 
> The precise error is:
> "Automation Error. connection to type library or object library for remote 
> process has been lost. Press OK for dialog ot remove reference."
> 
> 
> The error always happens at the SECOND insertline instruction (the first 
> line in sheet1 is written correctly) in the following code:
> 
> ----...----
> 
> Set VBCodeModmej = 
> ActiveWorkbook.VBProject.VBComponents(ActiveWorkbook.Worksheets("Sheet1").CodeName).CodeModule
> VBCodeModmej.InsertLines 1, "Private Sub Worksheet_SelectionChange(ByVal 
> Target As Range) "
> VBCodeModmej.InsertLines 2, "Dim Touched As Range"
> VBCodeModmej.InsertLines 3, "Dim void As String"
> etc etc
> 
> ---...---
> 
> 
> Note that with Office 2007 this never happens ...!
> 
> I tried the following things, read here and there for the network (I tried 
> them one at a time ...):
> -Put option explicit: useless
> -Put on error resume next: useless
> -Put Instead of 'private sub' the string 'sub': useless
> -Put Application.EnableEvents = True: useless
> -Put Application.OnTime Now + TimeValue("00:00:10") before the Set line: 
> useless
> 
> 
> Can you help me somehow?
> 
> Thank you so much right now
> 
> 
> Mark
0
Utf
4/17/2010 12:55:01 AM
Hi,
yes yes, I only write lines if the module is empty, otherwise  I delete all 
lines and then I write them. 
your link was useful, and I made some change in the code, that (apparently 
without reason) allowed me to write in the sheet1 module if the module is 
originally empty. 
But I still have that problem if the module is not empty: after deleting the 
rows, as soon as I try to write in the module, there is the automation error.

moreover,  I am noticing that the SAVE command is not working properly with 
..xls. Sometimes it saves the fresh code in the module, sometimes not. 
randomly.


this is sooooo unpredictable... not good at all : (

thanks
"Barb Reinhardt" wrote:

> You may find something here.
> 
> http://www.cpearson.com/excel/vbe.aspx
> 
> I've not done anything like what you are doing, but I wonder if you already 
> have some lines in the code module and are trying to insert lines where some 
> already exist.  Have you checked that?
> -- 
> HTH,
> 
> Barb Reinhardt
> 
> 
> 
> "perf" wrote:
> 
> > Hi,
> > I'm having a quite strange problem in a VBA macro that I made that is 
> > driving me crazy. First of all, I am using Excel 2003.
> > Well, when I try to insert lines of code in vba worksheet "sheet1", I always 
> > get an Automation Error that causes the restart of excel. 
> > The precise error is:
> > "Automation Error. connection to type library or object library for remote 
> > process has been lost. Press OK for dialog ot remove reference."
> > 
> > 
> > The error always happens at the SECOND insertline instruction (the first 
> > line in sheet1 is written correctly) in the following code:
> > 
> > ----...----
> > 
> > Set VBCodeModmej = 
> > ActiveWorkbook.VBProject.VBComponents(ActiveWorkbook.Worksheets("Sheet1").CodeName).CodeModule
> > VBCodeModmej.InsertLines 1, "Private Sub Worksheet_SelectionChange(ByVal 
> > Target As Range) "
> > VBCodeModmej.InsertLines 2, "Dim Touched As Range"
> > VBCodeModmej.InsertLines 3, "Dim void As String"
> > etc etc
> > 
> > ---...---
> > 
> > 
> > Note that with Office 2007 this never happens ...!
> > 
> > I tried the following things, read here and there for the network (I tried 
> > them one at a time ...):
> > -Put option explicit: useless
> > -Put on error resume next: useless
> > -Put Instead of 'private sub' the string 'sub': useless
> > -Put Application.EnableEvents = True: useless
> > -Put Application.OnTime Now + TimeValue("00:00:10") before the Set line: 
> > useless
> > 
> > 
> > Can you help me somehow?
> > 
> > Thank you so much right now
> > 
> > 
> > Mark
0
Utf
4/17/2010 1:43:01 PM
There can be unpredictable problems writing to worksheet modules in the same 
workbook that contains the code that's writing the changes. This can lead to 
crashing Excel. It might depend on what changes are being made and possibly 
if the sheet that's being modified is also the active-sheet. Whatever the 
reason, the underlying cause is probably due to the project trying to 
recompile while code is running.

Regards,
Peter T

"perf" <perf@discussions.microsoft.com> wrote in message 
news:3111DB58-004F-4AC0-94E7-266FCB7B66C2@microsoft.com...
> Hi,
> yes yes, I only write lines if the module is empty, otherwise  I delete 
> all
> lines and then I write them.
> your link was useful, and I made some change in the code, that (apparently
> without reason) allowed me to write in the sheet1 module if the module is
> originally empty.
> But I still have that problem if the module is not empty: after deleting 
> the
> rows, as soon as I try to write in the module, there is the automation 
> error.
>
> moreover,  I am noticing that the SAVE command is not working properly 
> with
> .xls. Sometimes it saves the fresh code in the module, sometimes not.
> randomly.
>
>
> this is sooooo unpredictable... not good at all : (
>
> thanks
> "Barb Reinhardt" wrote:
>
>> You may find something here.
>>
>> http://www.cpearson.com/excel/vbe.aspx
>>
>> I've not done anything like what you are doing, but I wonder if you 
>> already
>> have some lines in the code module and are trying to insert lines where 
>> some
>> already exist.  Have you checked that?
>> -- 
>> HTH,
>>
>> Barb Reinhardt
>>
>>
>>
>> "perf" wrote:
>>
>> > Hi,
>> > I'm having a quite strange problem in a VBA macro that I made that is
>> > driving me crazy. First of all, I am using Excel 2003.
>> > Well, when I try to insert lines of code in vba worksheet "sheet1", I 
>> > always
>> > get an Automation Error that causes the restart of excel.
>> > The precise error is:
>> > "Automation Error. connection to type library or object library for 
>> > remote
>> > process has been lost. Press OK for dialog ot remove reference."
>> >
>> >
>> > The error always happens at the SECOND insertline instruction (the 
>> > first
>> > line in sheet1 is written correctly) in the following code:
>> >
>> > ----...----
>> >
>> > Set VBCodeModmej =
>> > ActiveWorkbook.VBProject.VBComponents(ActiveWorkbook.Worksheets("Sheet1").CodeName).CodeModule
>> > VBCodeModmej.InsertLines 1, "Private Sub 
>> > Worksheet_SelectionChange(ByVal
>> > Target As Range) "
>> > VBCodeModmej.InsertLines 2, "Dim Touched As Range"
>> > VBCodeModmej.InsertLines 3, "Dim void As String"
>> > etc etc
>> >
>> > ---...---
>> >
>> >
>> > Note that with Office 2007 this never happens ...!
>> >
>> > I tried the following things, read here and there for the network (I 
>> > tried
>> > them one at a time ...):
>> > -Put option explicit: useless
>> > -Put on error resume next: useless
>> > -Put Instead of 'private sub' the string 'sub': useless
>> > -Put Application.EnableEvents = True: useless
>> > -Put Application.OnTime Now + TimeValue("00:00:10") before the Set 
>> > line:
>> > useless
>> >
>> >
>> > Can you help me somehow?
>> >
>> > Thank you so much right now
>> >
>> >
>> > Mark 


0
Peter
4/17/2010 10:30:33 PM
yes, it can be as you say.
do you think there can be a solution to this? for istance, disabling each 
type of operation when writing code? I do not know if you can do it, though.

by the way, the code in the worksheet is written by a macro xla, so 
something 'outside' the workbook itself.

you know... this unpredictability makes the product completely useless. 
would be almost better to have a product that always crashes under certain 
conditions, rather than have one that crashes sometimes. I can't give it 
around to customers, under these conditions!


thanks,

regards

mark


"Peter T" wrote:

> There can be unpredictable problems writing to worksheet modules in the same 
> workbook that contains the code that's writing the changes. This can lead to 
> crashing Excel. It might depend on what changes are being made and possibly 
> if the sheet that's being modified is also the active-sheet. Whatever the 
> reason, the underlying cause is probably due to the project trying to 
> recompile while code is running.
> 
> Regards,
> Peter T
> 
> "perf" <perf@discussions.microsoft.com> wrote in message 
> news:3111DB58-004F-4AC0-94E7-266FCB7B66C2@microsoft.com...
> > Hi,
> > yes yes, I only write lines if the module is empty, otherwise  I delete 
> > all
> > lines and then I write them.
> > your link was useful, and I made some change in the code, that (apparently
> > without reason) allowed me to write in the sheet1 module if the module is
> > originally empty.
> > But I still have that problem if the module is not empty: after deleting 
> > the
> > rows, as soon as I try to write in the module, there is the automation 
> > error.
> >
> > moreover,  I am noticing that the SAVE command is not working properly 
> > with
> > .xls. Sometimes it saves the fresh code in the module, sometimes not.
> > randomly.
> >
> >
> > this is sooooo unpredictable... not good at all : (
> >
> > thanks
> > "Barb Reinhardt" wrote:
> >
> >> You may find something here.
> >>
> >> http://www.cpearson.com/excel/vbe.aspx
> >>
> >> I've not done anything like what you are doing, but I wonder if you 
> >> already
> >> have some lines in the code module and are trying to insert lines where 
> >> some
> >> already exist.  Have you checked that?
> >> -- 
> >> HTH,
> >>
> >> Barb Reinhardt
> >>
> >>
> >>
> >> "perf" wrote:
> >>
> >> > Hi,
> >> > I'm having a quite strange problem in a VBA macro that I made that is
> >> > driving me crazy. First of all, I am using Excel 2003.
> >> > Well, when I try to insert lines of code in vba worksheet "sheet1", I 
> >> > always
> >> > get an Automation Error that causes the restart of excel.
> >> > The precise error is:
> >> > "Automation Error. connection to type library or object library for 
> >> > remote
> >> > process has been lost. Press OK for dialog ot remove reference."
> >> >
> >> >
> >> > The error always happens at the SECOND insertline instruction (the 
> >> > first
> >> > line in sheet1 is written correctly) in the following code:
> >> >
> >> > ----...----
> >> >
> >> > Set VBCodeModmej =
> >> > ActiveWorkbook.VBProject.VBComponents(ActiveWorkbook.Worksheets("Sheet1").CodeName).CodeModule
> >> > VBCodeModmej.InsertLines 1, "Private Sub 
> >> > Worksheet_SelectionChange(ByVal
> >> > Target As Range) "
> >> > VBCodeModmej.InsertLines 2, "Dim Touched As Range"
> >> > VBCodeModmej.InsertLines 3, "Dim void As String"
> >> > etc etc
> >> >
> >> > ---...---
> >> >
> >> >
> >> > Note that with Office 2007 this never happens ...!
> >> >
> >> > I tried the following things, read here and there for the network (I 
> >> > tried
> >> > them one at a time ...):
> >> > -Put option explicit: useless
> >> > -Put on error resume next: useless
> >> > -Put Instead of 'private sub' the string 'sub': useless
> >> > -Put Application.EnableEvents = True: useless
> >> > -Put Application.OnTime Now + TimeValue("00:00:10") before the Set 
> >> > line:
> >> > useless
> >> >
> >> >
> >> > Can you help me somehow?
> >> >
> >> > Thank you so much right now
> >> >
> >> >
> >> > Mark 
> 
> 
> .
> 
0
Utf
4/18/2010 9:27:01 AM
If the code writing the changes is in a different project I don't have an 
explanation for your problems, not the same as I had in mind.

Post enough code to replicate the problem with details how you are call in 
the code. On which point, if you are calling the code in the xla from the 
workbook that the xla will change, that in effect as the same as the code 
being in the same project. So, give details.

Regards,
Peter T


"perf" <perf@discussions.microsoft.com> wrote in message 
news:7039E346-4737-40BC-8ACC-2CFA0B81D30F@microsoft.com...
> yes, it can be as you say.
> do you think there can be a solution to this? for istance, disabling each
> type of operation when writing code? I do not know if you can do it, 
> though.
>
> by the way, the code in the worksheet is written by a macro xla, so
> something 'outside' the workbook itself.
>
> you know... this unpredictability makes the product completely useless.
> would be almost better to have a product that always crashes under certain
> conditions, rather than have one that crashes sometimes. I can't give it
> around to customers, under these conditions!
>
>
> thanks,
>
> regards
>
> mark
>
>
> "Peter T" wrote:
>
>> There can be unpredictable problems writing to worksheet modules in the 
>> same
>> workbook that contains the code that's writing the changes. This can lead 
>> to
>> crashing Excel. It might depend on what changes are being made and 
>> possibly
>> if the sheet that's being modified is also the active-sheet. Whatever the
>> reason, the underlying cause is probably due to the project trying to
>> recompile while code is running.
>>
>> Regards,
>> Peter T
>>
>> "perf" <perf@discussions.microsoft.com> wrote in message
>> news:3111DB58-004F-4AC0-94E7-266FCB7B66C2@microsoft.com...
>> > Hi,
>> > yes yes, I only write lines if the module is empty, otherwise  I delete
>> > all
>> > lines and then I write them.
>> > your link was useful, and I made some change in the code, that 
>> > (apparently
>> > without reason) allowed me to write in the sheet1 module if the module 
>> > is
>> > originally empty.
>> > But I still have that problem if the module is not empty: after 
>> > deleting
>> > the
>> > rows, as soon as I try to write in the module, there is the automation
>> > error.
>> >
>> > moreover,  I am noticing that the SAVE command is not working properly
>> > with
>> > .xls. Sometimes it saves the fresh code in the module, sometimes not.
>> > randomly.
>> >
>> >
>> > this is sooooo unpredictable... not good at all : (
>> >
>> > thanks
>> > "Barb Reinhardt" wrote:
>> >
>> >> You may find something here.
>> >>
>> >> http://www.cpearson.com/excel/vbe.aspx
>> >>
>> >> I've not done anything like what you are doing, but I wonder if you
>> >> already
>> >> have some lines in the code module and are trying to insert lines 
>> >> where
>> >> some
>> >> already exist.  Have you checked that?
>> >> -- 
>> >> HTH,
>> >>
>> >> Barb Reinhardt
>> >>
>> >>
>> >>
>> >> "perf" wrote:
>> >>
>> >> > Hi,
>> >> > I'm having a quite strange problem in a VBA macro that I made that 
>> >> > is
>> >> > driving me crazy. First of all, I am using Excel 2003.
>> >> > Well, when I try to insert lines of code in vba worksheet "sheet1", 
>> >> > I
>> >> > always
>> >> > get an Automation Error that causes the restart of excel.
>> >> > The precise error is:
>> >> > "Automation Error. connection to type library or object library for
>> >> > remote
>> >> > process has been lost. Press OK for dialog ot remove reference."
>> >> >
>> >> >
>> >> > The error always happens at the SECOND insertline instruction (the
>> >> > first
>> >> > line in sheet1 is written correctly) in the following code:
>> >> >
>> >> > ----...----
>> >> >
>> >> > Set VBCodeModmej =
>> >> > ActiveWorkbook.VBProject.VBComponents(ActiveWorkbook.Worksheets("Sheet1").CodeName).CodeModule
>> >> > VBCodeModmej.InsertLines 1, "Private Sub
>> >> > Worksheet_SelectionChange(ByVal
>> >> > Target As Range) "
>> >> > VBCodeModmej.InsertLines 2, "Dim Touched As Range"
>> >> > VBCodeModmej.InsertLines 3, "Dim void As String"
>> >> > etc etc
>> >> >
>> >> > ---...---
>> >> >
>> >> >
>> >> > Note that with Office 2007 this never happens ...!
>> >> >
>> >> > I tried the following things, read here and there for the network (I
>> >> > tried
>> >> > them one at a time ...):
>> >> > -Put option explicit: useless
>> >> > -Put on error resume next: useless
>> >> > -Put Instead of 'private sub' the string 'sub': useless
>> >> > -Put Application.EnableEvents = True: useless
>> >> > -Put Application.OnTime Now + TimeValue("00:00:10") before the Set
>> >> > line:
>> >> > useless
>> >> >
>> >> >
>> >> > Can you help me somehow?
>> >> >
>> >> > Thank you so much right now
>> >> >
>> >> >
>> >> > Mark
>>
>>
>> .
>> 


0
Peter
4/18/2010 1:11:18 PM
Hi,

New to the forum, so forgive me if I duplicate.

I also had similar problems, where excel crashes when starting to
build up text in a sheet.

I found out the reason for it not working is that Excel screens the
data you put in, and if not complete, it provides the error you would
get when you were to manual enter in.

So, starting with "Public sub xxxxxx ()" will cause an error, (missing
end sub).
(try "Public sub xxxxxx ():end sub" and she's okay, but that doesn't
help us if we need code in the sub.

What I do now is start building the text from the back, and always do
an "InsertLines 1, text"
That seems to do the trick.
0
Rene
4/21/2010 4:31:24 AM
That's a very interesting idea and makes perfect sense! It's also entirely 
consistent with what I suggested in my first post here, about the project 
attempting to recompile while other code was running.

Just one thing though, I would only expect the crash problem to occur when 
code is writing changes to "self", if also the activeworkbook/sheet also may 
make things even more prone for worse for some reason.

Thanks for posting.

Peter T


"Rene" <remucon@optusnet.com.au> wrote in message 
news:1f88905a-ca28-41f5-98a1-5e045d14e1ca@m24g2000prc.googlegroups.com...
> Hi,
>
> New to the forum, so forgive me if I duplicate.
>
> I also had similar problems, where excel crashes when starting to
> build up text in a sheet.
>
> I found out the reason for it not working is that Excel screens the
> data you put in, and if not complete, it provides the error you would
> get when you were to manual enter in.
>
> So, starting with "Public sub xxxxxx ()" will cause an error, (missing
> end sub).
> (try "Public sub xxxxxx ():end sub" and she's okay, but that doesn't
> help us if we need code in the sub.
>
> What I do now is start building the text from the back, and always do
> an "InsertLines 1, text"
> That seems to do the trick. 


0
Peter
4/21/2010 7:50:36 AM
oh thanks!!!!

this can help me a lot!

so, do you suggest to do this?

..InsertLines 1, "end sub"
..InsertLines 1, "code line n"
..InsertLines 1, "code line n-1"
....
..InsertLines 1, "private sub ()"


very clever. I'll try soon to do it and I let you know: )

mark

"Peter T" wrote:

> That's a very interesting idea and makes perfect sense! It's also entirely 
> consistent with what I suggested in my first post here, about the project 
> attempting to recompile while other code was running.
> 
> Just one thing though, I would only expect the crash problem to occur when 
> code is writing changes to "self", if also the activeworkbook/sheet also may 
> make things even more prone for worse for some reason.
> 
> Thanks for posting.
> 
> Peter T
> 
> 
> "Rene" <remucon@optusnet.com.au> wrote in message 
> news:1f88905a-ca28-41f5-98a1-5e045d14e1ca@m24g2000prc.googlegroups.com...
> > Hi,
> >
> > New to the forum, so forgive me if I duplicate.
> >
> > I also had similar problems, where excel crashes when starting to
> > build up text in a sheet.
> >
> > I found out the reason for it not working is that Excel screens the
> > data you put in, and if not complete, it provides the error you would
> > get when you were to manual enter in.
> >
> > So, starting with "Public sub xxxxxx ()" will cause an error, (missing
> > end sub).
> > (try "Public sub xxxxxx ():end sub" and she's okay, but that doesn't
> > help us if we need code in the sub.
> >
> > What I do now is start building the text from the back, and always do
> > an "InsertLines 1, text"
> > That seems to do the trick. 
> 
> 
> .
> 
0
Utf
4/22/2010 5:36:01 PM
I haven't tested myself but try something like this -

Dim i as Long
Dim LinesCount as Long
Dim arrLines() as String

Redim arrLines(1 to LinesCount)

' populate the string array with lines of code to be inserted in normal 
order
arrLines(1) =  "Public sub xxxxxx ()"
'' etc
arrLines(LinesCount) = "End Sub"

for i = ubound(arrLines) to 1 step -1
..InsertLines 1, arrLines(i)
next

' hold your breath!

Regards,
Peter T


"perf" <perf@discussions.microsoft.com> wrote in message 
news:A461B39A-AA72-46F2-8048-771AD4B22A43@microsoft.com...
> oh thanks!!!!
>
> this can help me a lot!
>
> so, do you suggest to do this?
>
> .InsertLines 1, "end sub"
> .InsertLines 1, "code line n"
> .InsertLines 1, "code line n-1"
> ...
> .InsertLines 1, "private sub ()"
>
>
> very clever. I'll try soon to do it and I let you know: )
>
> mark
>
> "Peter T" wrote:
>
>> That's a very interesting idea and makes perfect sense! It's also 
>> entirely
>> consistent with what I suggested in my first post here, about the project
>> attempting to recompile while other code was running.
>>
>> Just one thing though, I would only expect the crash problem to occur 
>> when
>> code is writing changes to "self", if also the activeworkbook/sheet also 
>> may
>> make things even more prone for worse for some reason.
>>
>> Thanks for posting.
>>
>> Peter T
>>
>>
>> "Rene" <remucon@optusnet.com.au> wrote in message
>> news:1f88905a-ca28-41f5-98a1-5e045d14e1ca@m24g2000prc.googlegroups.com...
>> > Hi,
>> >
>> > New to the forum, so forgive me if I duplicate.
>> >
>> > I also had similar problems, where excel crashes when starting to
>> > build up text in a sheet.
>> >
>> > I found out the reason for it not working is that Excel screens the
>> > data you put in, and if not complete, it provides the error you would
>> > get when you were to manual enter in.
>> >
>> > So, starting with "Public sub xxxxxx ()" will cause an error, (missing
>> > end sub).
>> > (try "Public sub xxxxxx ():end sub" and she's okay, but that doesn't
>> > help us if we need code in the sub.
>> >
>> > What I do now is start building the text from the back, and always do
>> > an "InsertLines 1, text"
>> > That seems to do the trick.
>>
>>
>> .
>> 


0
Peter
4/22/2010 6:12:38 PM
Hi peter!
I held my breath.. but it was not enough! I can write all the code lines but 
the first. everytime I reach the LinesCount to write the line "sub ZZZ()" I 
obtain an automation error, like before. 
I this doesn't happen always, expecially it's ok when I do it in debug mode, 
proceeding line by line writing the code.


what a pity, this solution was very very clever...

thanks anyway for your support!

mark


"Peter T" wrote:

> I haven't tested myself but try something like this -
> 
> Dim i as Long
> Dim LinesCount as Long
> Dim arrLines() as String
> 
> Redim arrLines(1 to LinesCount)
> 
> ' populate the string array with lines of code to be inserted in normal 
> order
> arrLines(1) =  "Public sub xxxxxx ()"
> '' etc
> arrLines(LinesCount) = "End Sub"
> 
> for i = ubound(arrLines) to 1 step -1
> ..InsertLines 1, arrLines(i)
> next
> 
> ' hold your breath!
> 
> Regards,
> Peter T
> 
> 
> "perf" <perf@discussions.microsoft.com> wrote in message 
> news:A461B39A-AA72-46F2-8048-771AD4B22A43@microsoft.com...
> > oh thanks!!!!
> >
> > this can help me a lot!
> >
> > so, do you suggest to do this?
> >
> > .InsertLines 1, "end sub"
> > .InsertLines 1, "code line n"
> > .InsertLines 1, "code line n-1"
> > ...
> > .InsertLines 1, "private sub ()"
> >
> >
> > very clever. I'll try soon to do it and I let you know: )
> >
> > mark
> >
> > "Peter T" wrote:
> >
> >> That's a very interesting idea and makes perfect sense! It's also 
> >> entirely
> >> consistent with what I suggested in my first post here, about the project
> >> attempting to recompile while other code was running.
> >>
> >> Just one thing though, I would only expect the crash problem to occur 
> >> when
> >> code is writing changes to "self", if also the activeworkbook/sheet also 
> >> may
> >> make things even more prone for worse for some reason.
> >>
> >> Thanks for posting.
> >>
> >> Peter T
> >>
> >>
> >> "Rene" <remucon@optusnet.com.au> wrote in message
> >> news:1f88905a-ca28-41f5-98a1-5e045d14e1ca@m24g2000prc.googlegroups.com...
> >> > Hi,
> >> >
> >> > New to the forum, so forgive me if I duplicate.
> >> >
> >> > I also had similar problems, where excel crashes when starting to
> >> > build up text in a sheet.
> >> >
> >> > I found out the reason for it not working is that Excel screens the
> >> > data you put in, and if not complete, it provides the error you would
> >> > get when you were to manual enter in.
> >> >
> >> > So, starting with "Public sub xxxxxx ()" will cause an error, (missing
> >> > end sub).
> >> > (try "Public sub xxxxxx ():end sub" and she's okay, but that doesn't
> >> > help us if we need code in the sub.
> >> >
> >> > What I do now is start building the text from the back, and always do
> >> > an "InsertLines 1, text"
> >> > That seems to do the trick.
> >>
> >>
> >> .
> >> 
> 
> 
> .
> 
0
Utf
4/24/2010 2:32:01 PM
Explain clearly, is there any connection between the code workbook (the one 
that's writing the changes) and the workbook that's having its project 
modified, that includes the "modified workbook" calling code in some other 
workbook.

If not, is there any problem to modify a brand new workbook.

Is there something else going on that we are not aware of.

If nothing above is of relevance post the ENTIRE code.

Regards,
Peter T


"perf" <perf@discussions.microsoft.com> wrote in message 
news:C108CFC3-D659-4EA0-9EDA-CD6651567A83@microsoft.com...
> Hi peter!
> I held my breath.. but it was not enough! I can write all the code lines 
> but
> the first. everytime I reach the LinesCount to write the line "sub ZZZ()" 
> I
> obtain an automation error, like before.
> I this doesn't happen always, expecially it's ok when I do it in debug 
> mode,
> proceeding line by line writing the code.
>
>
> what a pity, this solution was very very clever...
>
> thanks anyway for your support!
>
> mark
>
>
> "Peter T" wrote:
>
>> I haven't tested myself but try something like this -
>>
>> Dim i as Long
>> Dim LinesCount as Long
>> Dim arrLines() as String
>>
>> Redim arrLines(1 to LinesCount)
>>
>> ' populate the string array with lines of code to be inserted in normal
>> order
>> arrLines(1) =  "Public sub xxxxxx ()"
>> '' etc
>> arrLines(LinesCount) = "End Sub"
>>
>> for i = ubound(arrLines) to 1 step -1
>> ..InsertLines 1, arrLines(i)
>> next
>>
>> ' hold your breath!
>>
>> Regards,
>> Peter T
>>
>>
>> "perf" <perf@discussions.microsoft.com> wrote in message
>> news:A461B39A-AA72-46F2-8048-771AD4B22A43@microsoft.com...
>> > oh thanks!!!!
>> >
>> > this can help me a lot!
>> >
>> > so, do you suggest to do this?
>> >
>> > .InsertLines 1, "end sub"
>> > .InsertLines 1, "code line n"
>> > .InsertLines 1, "code line n-1"
>> > ...
>> > .InsertLines 1, "private sub ()"
>> >
>> >
>> > very clever. I'll try soon to do it and I let you know: )
>> >
>> > mark
>> >
>> > "Peter T" wrote:
>> >
>> >> That's a very interesting idea and makes perfect sense! It's also
>> >> entirely
>> >> consistent with what I suggested in my first post here, about the 
>> >> project
>> >> attempting to recompile while other code was running.
>> >>
>> >> Just one thing though, I would only expect the crash problem to occur
>> >> when
>> >> code is writing changes to "self", if also the activeworkbook/sheet 
>> >> also
>> >> may
>> >> make things even more prone for worse for some reason.
>> >>
>> >> Thanks for posting.
>> >>
>> >> Peter T
>> >>
>> >>
>> >> "Rene" <remucon@optusnet.com.au> wrote in message
>> >> news:1f88905a-ca28-41f5-98a1-5e045d14e1ca@m24g2000prc.googlegroups.com...
>> >> > Hi,
>> >> >
>> >> > New to the forum, so forgive me if I duplicate.
>> >> >
>> >> > I also had similar problems, where excel crashes when starting to
>> >> > build up text in a sheet.
>> >> >
>> >> > I found out the reason for it not working is that Excel screens the
>> >> > data you put in, and if not complete, it provides the error you 
>> >> > would
>> >> > get when you were to manual enter in.
>> >> >
>> >> > So, starting with "Public sub xxxxxx ()" will cause an error, 
>> >> > (missing
>> >> > end sub).
>> >> > (try "Public sub xxxxxx ():end sub" and she's okay, but that doesn't
>> >> > help us if we need code in the sub.
>> >> >
>> >> > What I do now is start building the text from the back, and always 
>> >> > do
>> >> > an "InsertLines 1, text"
>> >> > That seems to do the trick.
>> >>
>> >>
>> >> .
>> >>
>>
>>
>> .
>> 


0
Peter
4/24/2010 3:28:08 PM
Dear Peter,
Maybe I just solved the problem with a trivial solution.  I noticed that 
deleting the possible code present in sheet1, then save the file, close it, 
reopen it and at that stage write the new code from down to up seems to work 
well. at least so far.
I do not why, but the combination of saving, closing and writing in a 
reverse way it's good.

answering to your question, posting all code would require too much time, 
because the xla module are many. I can say that a connection between the xla 
and the file is there, because the xla opens a dialog menu that searches in a 
database and allows to open from the menu the selected file. and then it 
modifies the code... it sounds a little complicated,  I know...

but now it works, this is the most important thing!

thank to you all


mark

: )


"Peter T" wrote:

> Explain clearly, is there any connection between the code workbook (the one 
> that's writing the changes) and the workbook that's having its project 
> modified, that includes the "modified workbook" calling code in some other 
> workbook.
> 
> If not, is there any problem to modify a brand new workbook.
> 
> Is there something else going on that we are not aware of.
> 
> If nothing above is of relevance post the ENTIRE code.
> 
> Regards,
> Peter T
> 
> 
> "perf" <perf@discussions.microsoft.com> wrote in message 
> news:C108CFC3-D659-4EA0-9EDA-CD6651567A83@microsoft.com...
> > Hi peter!
> > I held my breath.. but it was not enough! I can write all the code lines 
> > but
> > the first. everytime I reach the LinesCount to write the line "sub ZZZ()" 
> > I
> > obtain an automation error, like before.
> > I this doesn't happen always, expecially it's ok when I do it in debug 
> > mode,
> > proceeding line by line writing the code.
> >
> >
> > what a pity, this solution was very very clever...
> >
> > thanks anyway for your support!
> >
> > mark
> >
> >
> > "Peter T" wrote:
> >
> >> I haven't tested myself but try something like this -
> >>
> >> Dim i as Long
> >> Dim LinesCount as Long
> >> Dim arrLines() as String
> >>
> >> Redim arrLines(1 to LinesCount)
> >>
> >> ' populate the string array with lines of code to be inserted in normal
> >> order
> >> arrLines(1) =  "Public sub xxxxxx ()"
> >> '' etc
> >> arrLines(LinesCount) = "End Sub"
> >>
> >> for i = ubound(arrLines) to 1 step -1
> >> ..InsertLines 1, arrLines(i)
> >> next
> >>
> >> ' hold your breath!
> >>
> >> Regards,
> >> Peter T
> >>
> >>
> >> "perf" <perf@discussions.microsoft.com> wrote in message
> >> news:A461B39A-AA72-46F2-8048-771AD4B22A43@microsoft.com...
> >> > oh thanks!!!!
> >> >
> >> > this can help me a lot!
> >> >
> >> > so, do you suggest to do this?
> >> >
> >> > .InsertLines 1, "end sub"
> >> > .InsertLines 1, "code line n"
> >> > .InsertLines 1, "code line n-1"
> >> > ...
> >> > .InsertLines 1, "private sub ()"
> >> >
> >> >
> >> > very clever. I'll try soon to do it and I let you know: )
> >> >
> >> > mark
> >> >
> >> > "Peter T" wrote:
> >> >
> >> >> That's a very interesting idea and makes perfect sense! It's also
> >> >> entirely
> >> >> consistent with what I suggested in my first post here, about the 
> >> >> project
> >> >> attempting to recompile while other code was running.
> >> >>
> >> >> Just one thing though, I would only expect the crash problem to occur
> >> >> when
> >> >> code is writing changes to "self", if also the activeworkbook/sheet 
> >> >> also
> >> >> may
> >> >> make things even more prone for worse for some reason.
> >> >>
> >> >> Thanks for posting.
> >> >>
> >> >> Peter T
> >> >>
> >> >>
> >> >> "Rene" <remucon@optusnet.com.au> wrote in message
> >> >> news:1f88905a-ca28-41f5-98a1-5e045d14e1ca@m24g2000prc.googlegroups.com...
> >> >> > Hi,
> >> >> >
> >> >> > New to the forum, so forgive me if I duplicate.
> >> >> >
> >> >> > I also had similar problems, where excel crashes when starting to
> >> >> > build up text in a sheet.
> >> >> >
> >> >> > I found out the reason for it not working is that Excel screens the
> >> >> > data you put in, and if not complete, it provides the error you 
> >> >> > would
> >> >> > get when you were to manual enter in.
> >> >> >
> >> >> > So, starting with "Public sub xxxxxx ()" will cause an error, 
> >> >> > (missing
> >> >> > end sub).
> >> >> > (try "Public sub xxxxxx ():end sub" and she's okay, but that doesn't
> >> >> > help us if we need code in the sub.
> >> >> >
> >> >> > What I do now is start building the text from the back, and always 
> >> >> > do
> >> >> > an "InsertLines 1, text"
> >> >> > That seems to do the trick.
> >> >>
> >> >>
> >> >> .
> >> >>
> >>
> >>
> >> .
> >> 
> 
> 
> .
> 
0
Utf
4/24/2010 4:29:01 PM
I don't understand what you are saying here

> I can say that a connection between the xla
> and the file is there, because the xla opens a dialog menu that searches 
> in a
> database and allows to open from the menu the selected file.

Are you saying code in the file that will be modified calls the xla which in 
turn modifies the code. If so that is the reason for the problem (as I have 
been trying to say all along), and there is probably a better solution.

Regards,
Peter T



"perf" <perf@discussions.microsoft.com> wrote in message 
news:AD8B1EB7-0811-48F0-BC2B-C93FCC2D7E1F@microsoft.com...
> Dear Peter,
> Maybe I just solved the problem with a trivial solution.  I noticed that
> deleting the possible code present in sheet1, then save the file, close 
> it,
> reopen it and at that stage write the new code from down to up seems to 
> work
> well. at least so far.
> I do not why, but the combination of saving, closing and writing in a
> reverse way it's good.
>
> answering to your question, posting all code would require too much time,
> because the xla module are many. I can say that a connection between the 
> xla
> and the file is there, because the xla opens a dialog menu that searches 
> in a
> database and allows to open from the menu the selected file. and then it
> modifies the code... it sounds a little complicated,  I know...
>
> but now it works, this is the most important thing!
>
> thank to you all
>
>
> mark
>
> : )
>
>
> "Peter T" wrote:
>
>> Explain clearly, is there any connection between the code workbook (the 
>> one
>> that's writing the changes) and the workbook that's having its project
>> modified, that includes the "modified workbook" calling code in some 
>> other
>> workbook.
>>
>> If not, is there any problem to modify a brand new workbook.
>>
>> Is there something else going on that we are not aware of.
>>
>> If nothing above is of relevance post the ENTIRE code.
>>
>> Regards,
>> Peter T
>>
>>
>> "perf" <perf@discussions.microsoft.com> wrote in message
>> news:C108CFC3-D659-4EA0-9EDA-CD6651567A83@microsoft.com...
>> > Hi peter!
>> > I held my breath.. but it was not enough! I can write all the code 
>> > lines
>> > but
>> > the first. everytime I reach the LinesCount to write the line "sub 
>> > ZZZ()"
>> > I
>> > obtain an automation error, like before.
>> > I this doesn't happen always, expecially it's ok when I do it in debug
>> > mode,
>> > proceeding line by line writing the code.
>> >
>> >
>> > what a pity, this solution was very very clever...
>> >
>> > thanks anyway for your support!
>> >
>> > mark
>> >
>> >
>> > "Peter T" wrote:
>> >
>> >> I haven't tested myself but try something like this -
>> >>
>> >> Dim i as Long
>> >> Dim LinesCount as Long
>> >> Dim arrLines() as String
>> >>
>> >> Redim arrLines(1 to LinesCount)
>> >>
>> >> ' populate the string array with lines of code to be inserted in 
>> >> normal
>> >> order
>> >> arrLines(1) =  "Public sub xxxxxx ()"
>> >> '' etc
>> >> arrLines(LinesCount) = "End Sub"
>> >>
>> >> for i = ubound(arrLines) to 1 step -1
>> >> ..InsertLines 1, arrLines(i)
>> >> next
>> >>
>> >> ' hold your breath!
>> >>
>> >> Regards,
>> >> Peter T
>> >>
>> >>
>> >> "perf" <perf@discussions.microsoft.com> wrote in message
>> >> news:A461B39A-AA72-46F2-8048-771AD4B22A43@microsoft.com...
>> >> > oh thanks!!!!
>> >> >
>> >> > this can help me a lot!
>> >> >
>> >> > so, do you suggest to do this?
>> >> >
>> >> > .InsertLines 1, "end sub"
>> >> > .InsertLines 1, "code line n"
>> >> > .InsertLines 1, "code line n-1"
>> >> > ...
>> >> > .InsertLines 1, "private sub ()"
>> >> >
>> >> >
>> >> > very clever. I'll try soon to do it and I let you know: )
>> >> >
>> >> > mark
>> >> >
>> >> > "Peter T" wrote:
>> >> >
>> >> >> That's a very interesting idea and makes perfect sense! It's also
>> >> >> entirely
>> >> >> consistent with what I suggested in my first post here, about the
>> >> >> project
>> >> >> attempting to recompile while other code was running.
>> >> >>
>> >> >> Just one thing though, I would only expect the crash problem to 
>> >> >> occur
>> >> >> when
>> >> >> code is writing changes to "self", if also the activeworkbook/sheet
>> >> >> also
>> >> >> may
>> >> >> make things even more prone for worse for some reason.
>> >> >>
>> >> >> Thanks for posting.
>> >> >>
>> >> >> Peter T
>> >> >>
>> >> >>
>> >> >> "Rene" <remucon@optusnet.com.au> wrote in message
>> >> >> news:1f88905a-ca28-41f5-98a1-5e045d14e1ca@m24g2000prc.googlegroups.com...
>> >> >> > Hi,
>> >> >> >
>> >> >> > New to the forum, so forgive me if I duplicate.
>> >> >> >
>> >> >> > I also had similar problems, where excel crashes when starting to
>> >> >> > build up text in a sheet.
>> >> >> >
>> >> >> > I found out the reason for it not working is that Excel screens 
>> >> >> > the
>> >> >> > data you put in, and if not complete, it provides the error you
>> >> >> > would
>> >> >> > get when you were to manual enter in.
>> >> >> >
>> >> >> > So, starting with "Public sub xxxxxx ()" will cause an error,
>> >> >> > (missing
>> >> >> > end sub).
>> >> >> > (try "Public sub xxxxxx ():end sub" and she's okay, but that 
>> >> >> > doesn't
>> >> >> > help us if we need code in the sub.
>> >> >> >
>> >> >> > What I do now is start building the text from the back, and 
>> >> >> > always
>> >> >> > do
>> >> >> > an "InsertLines 1, text"
>> >> >> > That seems to do the trick.
>> >> >>
>> >> >>
>> >> >> .
>> >> >>
>> >>
>> >>
>> >> .
>> >>
>>
>>
>> .
>> 


0
Peter
4/24/2010 4:49:08 PM
Not exactly... better explanation:

I load an xla that manage excel file in some directories. the xla opens a 
toolbar with some blocks to draw in these file and shows a menu where I can 
create a new sheet (so, a new file), delete one of them ect ect. all these 
file are listed in an access database, and everytime the xla shows in the 
menu the files present it reads in the access database. all these files have 
code in the sheet1 module, so when I create a new one, the xla creates the 
code in the new sheet1 module.
but sometimes I have to modify the code in the sheet, so I open the menu via 
xla and I delete the code and I rewrite it.

this last modification is what causes the automation error.

so, everything is managed by the xla, so it's not true that there is no link 
between xla and excel file. but it's not true that the code added in the 
sheet1 recall the xla or something like this.

I hope the structure is a little clearer for you now. : ) it's not very easy 
to explain, i know.

thanks for your patience

mark



"Peter T" wrote:

> I don't understand what you are saying here
> 
> > I can say that a connection between the xla
> > and the file is there, because the xla opens a dialog menu that searches 
> > in a
> > database and allows to open from the menu the selected file.
> 
> Are you saying code in the file that will be modified calls the xla which in 
> turn modifies the code. If so that is the reason for the problem (as I have 
> been trying to say all along), and there is probably a better solution.
> 
> Regards,
> Peter T
> 
> 
> 
> "perf" <perf@discussions.microsoft.com> wrote in message 
> news:AD8B1EB7-0811-48F0-BC2B-C93FCC2D7E1F@microsoft.com...
> > Dear Peter,
> > Maybe I just solved the problem with a trivial solution.  I noticed that
> > deleting the possible code present in sheet1, then save the file, close 
> > it,
> > reopen it and at that stage write the new code from down to up seems to 
> > work
> > well. at least so far.
> > I do not why, but the combination of saving, closing and writing in a
> > reverse way it's good.
> >
> > answering to your question, posting all code would require too much time,
> > because the xla module are many. I can say that a connection between the 
> > xla
> > and the file is there, because the xla opens a dialog menu that searches 
> > in a
> > database and allows to open from the menu the selected file. and then it
> > modifies the code... it sounds a little complicated,  I know...
> >
> > but now it works, this is the most important thing!
> >
> > thank to you all
> >
> >
> > mark
> >
> > : )
> >
> >
> > "Peter T" wrote:
> >
> >> Explain clearly, is there any connection between the code workbook (the 
> >> one
> >> that's writing the changes) and the workbook that's having its project
> >> modified, that includes the "modified workbook" calling code in some 
> >> other
> >> workbook.
> >>
> >> If not, is there any problem to modify a brand new workbook.
> >>
> >> Is there something else going on that we are not aware of.
> >>
> >> If nothing above is of relevance post the ENTIRE code.
> >>
> >> Regards,
> >> Peter T
> >>
> >>
> >> "perf" <perf@discussions.microsoft.com> wrote in message
> >> news:C108CFC3-D659-4EA0-9EDA-CD6651567A83@microsoft.com...
> >> > Hi peter!
> >> > I held my breath.. but it was not enough! I can write all the code 
> >> > lines
> >> > but
> >> > the first. everytime I reach the LinesCount to write the line "sub 
> >> > ZZZ()"
> >> > I
> >> > obtain an automation error, like before.
> >> > I this doesn't happen always, expecially it's ok when I do it in debug
> >> > mode,
> >> > proceeding line by line writing the code.
> >> >
> >> >
> >> > what a pity, this solution was very very clever...
> >> >
> >> > thanks anyway for your support!
> >> >
> >> > mark
> >> >
> >> >
> >> > "Peter T" wrote:
> >> >
> >> >> I haven't tested myself but try something like this -
> >> >>
> >> >> Dim i as Long
> >> >> Dim LinesCount as Long
> >> >> Dim arrLines() as String
> >> >>
> >> >> Redim arrLines(1 to LinesCount)
> >> >>
> >> >> ' populate the string array with lines of code to be inserted in 
> >> >> normal
> >> >> order
> >> >> arrLines(1) =  "Public sub xxxxxx ()"
> >> >> '' etc
> >> >> arrLines(LinesCount) = "End Sub"
> >> >>
> >> >> for i = ubound(arrLines) to 1 step -1
> >> >> ..InsertLines 1, arrLines(i)
> >> >> next
> >> >>
> >> >> ' hold your breath!
> >> >>
> >> >> Regards,
> >> >> Peter T
> >> >>
> >> >>
> >> >> "perf" <perf@discussions.microsoft.com> wrote in message
> >> >> news:A461B39A-AA72-46F2-8048-771AD4B22A43@microsoft.com...
> >> >> > oh thanks!!!!
> >> >> >
> >> >> > this can help me a lot!
> >> >> >
> >> >> > so, do you suggest to do this?
> >> >> >
> >> >> > .InsertLines 1, "end sub"
> >> >> > .InsertLines 1, "code line n"
> >> >> > .InsertLines 1, "code line n-1"
> >> >> > ...
> >> >> > .InsertLines 1, "private sub ()"
> >> >> >
> >> >> >
> >> >> > very clever. I'll try soon to do it and I let you know: )
> >> >> >
> >> >> > mark
> >> >> >
> >> >> > "Peter T" wrote:
> >> >> >
> >> >> >> That's a very interesting idea and makes perfect sense! It's also
> >> >> >> entirely
> >> >> >> consistent with what I suggested in my first post here, about the
> >> >> >> project
> >> >> >> attempting to recompile while other code was running.
> >> >> >>
> >> >> >> Just one thing though, I would only expect the crash problem to 
> >> >> >> occur
> >> >> >> when
> >> >> >> code is writing changes to "self", if also the activeworkbook/sheet
> >> >> >> also
> >> >> >> may
> >> >> >> make things even more prone for worse for some reason.
> >> >> >>
> >> >> >> Thanks for posting.
> >> >> >>
> >> >> >> Peter T
> >> >> >>
> >> >> >>
> >> >> >> "Rene" <remucon@optusnet.com.au> wrote in message
> >> >> >> news:1f88905a-ca28-41f5-98a1-5e045d14e1ca@m24g2000prc.googlegroups.com...
> >> >> >> > Hi,
> >> >> >> >
> >> >> >> > New to the forum, so forgive me if I duplicate.
> >> >> >> >
> >> >> >> > I also had similar problems, where excel crashes when starting to
> >> >> >> > build up text in a sheet.
> >> >> >> >
> >> >> >> > I found out the reason for it not working is that Excel screens 
> >> >> >> > the
> >> >> >> > data you put in, and if not complete, it provides the error you
> >> >> >> > would
> >> >> >> > get when you were to manual enter in.
> >> >> >> >
> >> >> >> > So, starting with "Public sub xxxxxx ()" will cause an error,
> >> >> >> > (missing
> >> >> >> > end sub).
> >> >> >> > (try "Public sub xxxxxx ():end sub" and she's okay, but that 
> >> >> >> > doesn't
> >> >> >> > help us if we need code in the sub.
> >> >> >> >
> >> >> >> > What I do now is start building the text from the back, and 
> >> >> >> > always
> >> >> >> > do
> >> >> >> > an "InsertLines 1, text"
> >> >> >> > That seems to do the trick.
> >> >> >>
> >> >> >>
> >> >> >> .
> >> >> >>
> >> >>
> >> >>
> >> >> .
> >> >>
> >>
> >>
> >> .
> >> 
> 
> 
> .
> 
0
Utf
4/24/2010 7:47:01 PM
Reply:

Similar Artilces:

Excel Regional Date Format Options
A client of ours in NZ is complaining that date format options for English (New Zealand) have changed from older versions of excel (they are using 2003) Some of their spreadsheets have dates formatted as dd-mmm-yy, mmm-yy and dddd,dd,mmm but these options do not exist anymore. Is there anyway to add options to this list without using the custom format option? Thanks, Jesse I just compared the Excel 97 and Excel 2003 built-in date formats and they are mostly unchanged. 2003 has a few more but I don't think there were any subtractions. The formats dd-mmm-yy and mmm-yy are righ...

Error message needed if incorrect Date Of Birth (DOB) entered
Hi, In cell D6 I have a DOB entered....in cell E6 I have a datedif function that has 3 conditional formatting set as: 1 - If D6 is blank, E6 is blank. 2 - If DOB in D6 is between 18 - 24 then E6 shows age and cell is yellow. 3 - If DOB in D6 is 25 or over then E6 shows age and cell is blue. What I need is when a DOB is entered in D6 under 16 years old, then D6 returns an error message -" You have Entered an Age under 16 Years - Retry!! ". I have tried Data Validation, but cant get a message from tha as I dont know what to set as the date validation. I do need a...

Error during Exchange Backup
Hello All, I am writing an application to backup and restore M.S. Exchange server programatically. I am using the Exchange Backup and Restore API and am developing the application in VC++ 6.0 on a Windows Server 2003 Enterprise Editioon. I am able to do the backup successfully but I am getting error in the function "HrESERestoreAddDatabase" during the resore. I am trying to call the function HrESERestoreComplete as follows: //<step 8> //HrESERestoreComplete CString strTempLocationPath; CString strTempLocationPath1; strTempLocationPath = _T("C:\\viraj\\exchangedata_b...

Never Ceasing Error Message in My Mailbox
Account: 'cwjamaicA', Server: 'mail.cwjamaica.com', Protocol: POP3, Server Response: '.', Port: 110, Secure(SSL): No, Error Number: 0x800CCC18 Hello, I keep getting the message as stated above in Email box. What does this mean and how can I clear this up. Thanks. Burchie S burchsam@cwjamaica.com ...

ALL of my email is gone- getting error message as well
I am getting this message: The message store has been corrupted by an application external to Windows Mail. Windows Mail has been able to successfully recover from this corruption. (0x0000000) In addition ALL of my emails are gone. Any suggestions on how I can recover them? And what I should do about the message. Try running the various repair functions in the WMUtil program: http://www.oehelp.com/WMUtil If still no improvement, upgrade to Windows Live Mail: http://download.live.com/wlmail It will automatically import all your WM data. Gary VanderMolen, Microsoft MVP (Mai...

Excel is creating temp files Help!!!
Hi i have to files in excel, i cant figure it out, whenever i open th files, they create temp files into the same location, when i shut dow the program the temp files are left there. Is their a way to make it so temp files are not saved. Or is their a way to make it so that the creation of temp files i turned off. Thanks jaso -- greenfalco ----------------------------------------------------------------------- greenfalcon's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1362 View this thread: http://www.excelforum.com/showthread.php?threadid=26182 What do th...

MS Excel 2003 cannot auto calculate formula, need to press F9 each time
hi, I don't know why my excel 2003 new worksheet cannot auto calulate formula (eg. summation), i need to press F9 and it will refresh and show the new figure. there is "calculate" word at the left hand bottom of the screen. what is the likely reason ? it was running fine 2 weeks ago. any advise is greatly appreciated. rgds. Tools>Options>Calculation tab, check Automatic -- Kind regards, Niek Otten Microsoft MVP - Excel <sg_s123@yahoo.com.sg> wrote in message news:d5393a73-eb7d-4e08-8fab-5f4ab895f77a@e23g2000prf.googlegroups.com... | hi, | | I don't know w...

Excel sheet truncated after copying to powerpoint slide
Hi, We are using Office 2000 with sp3. When we copy excel sheet to power point slide, some of the rows and colums are truncated. Also the font size is changed. We can see only some part of the sheet. Let me know if anybody faced this problem.. Thanks in advance Shekar. Debra Dalgleish posted this link that you may want to review: http://www.rdpslides.com/pptfaq/FAQ00068.htm Microsoft wrote: > > Hi, > > We are using Office 2000 with sp3. When we copy excel sheet to power point > slide, some of the rows and colums are truncated. Also the font size is > changed. We can s...

Errors 0xC00CE553 and 0x800CCC32
If I may request your assistance again: I keep getting this error message 0x800CCC32 in a random mode and with diverse reasons, such as "Not Authorized", "Verify user and password", "Bad password", "Incorrect user or password" etc. Now I am also getting a 0xC00CE553 error. This happened usually randomly, in regard to 5 MSN and 3 Legacy Hotmail accounts I have, when downloading the messages. Most times it does not occur. Yet and in spite of the error, the messages download anyway. I have implemented placing msn.com and hotmail.com into the Privacy tab o...

How to create a connection point in Excel
When I group autoshapes the group itself does not have connection points. A connector connects to one of the grouped shapes instead. So, the connector beginconnecedshape (or endconnectedshape) property contains the name of the contained shape and not the name of the group. Is there a way to create connection points for a group? Alternatively, is it possible to change a group into a single shape with connection points? ...

Count problems[Excel 97]
Hi there, I did a search on the forum to find an answer to my question but didn' find anything. Here is my prob : Lets say I got this page-> ___a___b_____c__d__ 1 Name Type Job bla 2 Name Type Job bla 3 Name Type Job bla 4 Name Type Job bla 5 Name Type Job bob I want a Cell to write how many row I got( 5 in this exemple) and onl count the cells with bla in the D column(4 in this exemple). Sorry if I'm not really clear but if you can help me feel free t answer :) thx, Tulkas -- Tulka -----------------------------------------------------------...

Crashes after printing invoices
Money Small Business 2005 crashes after printing. Searched the newsgroups, but didn't find any relevant solution. -Max Hate Microsoft This is often caused by incompatible printer drivers. I would suggest that you check with the printer manufacturer to see if there's a newer or OLDER printer driver available. Also, make sure that the driver you're using is compatible with your version of Windows (XP, 2000, 98, whatever). -- "Max" <maximus@portvista.com> wrote in message news:uquQPHWXFHA.2124@TK2MSFTNGP14.phx.gbl... > Money Small Business 2005 crash...

Send and Receive All Error Message
When Sending and Receiving before going offline with Outlook XP,(exchange 2000) I get the following error... Task 'Microsoft Exchange Server' reported error (0x8004010F) : 'The operation failed. An object could not be found. ...

Outlook 2000 error msg.
I am running XP on a Dell 8200. I've been using Outlook 2000 for a long time now and all of the sudden I get the following msg: unable to open default e-mail folder. C:\Documents and Settings\tdiehl\application data\Microsoft\Outlook\Outlook.Pst. I have inserted MO-2000 CD and tried to repair and removed the program completely from machine and reinstalled. NO luck. Any ideas??? How big is your pst file? "Ted D." <tdiehl@earthlink.net> wrote in message news:03ae01c34803$5bb55ca0$a501280a@phx.gbl... > I am running XP on a Dell 8200. I've been using Outlook...

Can not install Office Ultimate 2007 because of a setup error mess
Hello group, I have a desktop with no Office Suite which I built with Windows XP Pro SP2 (Version 2002), from a WGA Kit. I ordered the back-up discs (2 pcs) Office Ultimate 2007 from digital river.com store and tried installing in this machine but I get this message: "Setup error: The language of this installation package is not supported by your system." I tried it on the 2nd DVD drive of the same machine but same result. I tried installing the Office software in a Sony Vaio laptop and it seems it will install properly and I discontinued the setup. Any information/ass...

Outlook 2003 hyperlinking error
Have just installed Outlook 2003, when I click on a html link within an email it opens my default web browser however the link appears in the browser with these additional symbols which stop the requested site from loading eg: http://%1%20http://www.microsoft.com Does anyone know how to fix this problem? Its driving me nuts. ...

Help with automating file name
I have the following code that exports the below query to excell. I would like the files name to include the month and date. How would I format this? DoCmd.OutputTo acOutputQuery, "qryShopOrderSqFtShippedSummaryExport",_ acFormatXLS, "W:\Cokato\Production\ProdRoomRpt.xls" -- Matt Campbell mattc (at) saunatec [dot] com Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200708/1 Hi, Matt. > I would > like the files name to include the month and date. Uh, . . . the date _always_ includes the month, unless you're r...

reported error (0x80070057)
When I try to send an email to several addresses using Outlook 2003, I get the error: Task 'xxx - Sending' reported error (0x80070057) : 'Could not complete the operation. One or more parameter values are not valid.' I see no apparent problem with the addresses. Please tell me in simple English (well, as simple as possible) how to solve this problem. I am not an expert user. Thank you. What type of mail account is this? Exchange, POP3, IMAP? "lemonscented" <lemonscented@discussions.microsoft.com> wrote in message news:EC994AB1-B72B-4...

Createing Quote sometimes make Error: 80070057
Hello NG, Today I found some funny problems. I create Quotes via the quote WebService from the CRM. This normally works fine, but now I have some quotes, which will get me an error, when I open it. This error is no normal error, I will get an white/yellow Page with ASPX Errorpage: Here the Message (sorry but I only have this error in German): Serverfehler in der Anwendung '/'. ---------------------------------------------------------------------------- ---- Falscher Parameter. Beschreibung: Beim Ausf�hren der aktuellen Webanforderung ist ein unverarbeiteter Fehler aufgetret...

Excel question #9
Is there a way that I can transpose the order of the values in a cell? For example I have the values of 10.200.13.1 in a cell and I want to transpose(not sure if that is the correct term or not) the order of the values in the cell so that they appear as 1.13.200.10. thanks for any help as I have literally 4 pages of these kind of values that I have to flip. -- Brian blanktree at hotmail dot com Hi try the following user defined function from John Walkenbach's book Excel 2000 formulas (great resource by the way): Option Explicit Function REVERSETEXT(text) As String ' R...

Data from Access query to Excel
To pull data from an Access 2003 database, I have created the queries in Access, then import into Excel. The problem is that all the numbers that are pulled into Excel are text and need to convert them into numbers to run formulas on. I have converted a few sheets by hand, but, some have will over 50,000 rows. Is there a function to select all number colums (the colums are the same through out the sheets) and convert? Thanks There are instructions here for converting text to numbers: http://www.contextures.com/xlDataEntry03.html You can select all the columns, and only the num...

Excel and NPV
Hi, I have a problem regarding the NPV function on Excel. Does anyone know how to use the function if the interest rate changes over a period of 20 years. Say for example, for the first 8 years the interest rate is 8%, then for the next 5 it's 12%, and for the last 7 it's 14%. It would be great if any one can me with this! thanks! As far as I can tell, there is no way you can vary the discount rate in the NPV function in Excel. In fact it is very difficult to model this in any calculation tool. Here is an interesting article which may help you see the difficulty; http://...

Paths to becoming an Excel Expert
Dear community I am a retired accountant, and have used Excel for many years, including power user, macro and VBA development. I would like to specialise in this field + maybe delivering Excel training, maybe offering my services as a freelance. What is the best path to develop this expertise? Is there a worthwhile Microsoft Certification route - which I find confusing? And finally is it worth sticking with VBA which seems to be on the back burner now? Thanks for any suggestions. First, some links to several "Excel Experts" www.chandoo.org www.peltiertech.co...

How to view the code for excel built-in functions?
Is it possible? -For example the function PMT(). thanks. No, the code is compiled, so it would likely be less than useful anyway. About the best you can do is check out the equations used in Help (see "PV"). In article <OSU3OXOBGHA.1676@TK2MSFTNGP09.phx.gbl>, "serdar" <s@s.com> wrote: > Is it possible? -For example the function PMT(). > thanks. ...

Compile Error in hidden module: Autoexec #2
I need help when ever I opepen or close any office product ( excel , word etc...) I get the message shown above.... How do I fix it please help ag Take a look at this: http://support.microsoft.com/default.aspx?scid=kb;EN-US;q307410 HTH Anders Silven "Ash" <ashrafg@sympatico.ca> skrev i meddelandet news:1574f01c446a0$4b5db2c0$a501280a@phx.gbl... > I need help when ever I opepen or close any office > product ( excel , word etc...) I get the message shown > above.... How do I fix it please help > > ag ...