Author | Topic: Macro in excell | |
---|---|---|
Ribo Salamanca | Macro in excell on Thu, 20 Sep 2012 12:20:17 -0500 Hello all I am a neophyte in this topic ActiveX. Can someone help me with this? I need to run this macro in xBase consegurlo but I can not. Set n = Cells.Find(What:="bolu") If n Is Nothing Then MsgBox "nay" Else MsgBox "Finded" End If I search a specific column, also found the cell validate whether the given content, the messages must be retrieved in xBase. Thanks, Ribo Salamanca | |
Peter Alderliesten | Re: Macro in excell on Fri, 21 Sep 2012 16:06:00 +0200 Ribo, > I am a neophyte in this topic ActiveX. > > Can someone help me with this? > I need to run this macro in xBase consegurlo but I can not. > > Set n = Cells.Find(What:="bolu") > If n Is Nothing Then > MsgBox "nay" > Else > MsgBox "Finded" > End If > > I search a specific column, also found the cell validate whether the given > content, the messages must be retrieved in xBase. Are you talking about a connection to Excel? Is there a connection to Excel already or do you need opening a Worksheet first. You might want to have a look at the Xbase++ samples for that (xppw32\source\samples\activex\msexcel) Peter | |
Ribo Salamanca | Re: Macro in excell on Fri, 21 Sep 2012 11:11:04 -0500 Thanks Peter Yes, I consider regarding the connection and opening excel with the example of (xppw32 \ source \ samples \ activex \ msexcel) . What I have trouble with the code, I'm trying something like this: oSheet: Cells.Find (What: = "110505"). Activate oSheet: Cells.Replace (What: = "OKOKOK") But do not get what I need, I'd appreciate me a hand with that. regards Ribo "Peter Alderliesten" escribió en el mensaje de noticias:ipmzhf7qjqur.4nacqf40uwir.dlg@40tude.net... Ribo, > I am a neophyte in this topic ActiveX. > > Can someone help me with this? > I need to run this macro in xBase consegurlo but I can not. > > Set n = Cells.Find(What:="bolu") > If n Is Nothing Then > MsgBox "nay" > Else > MsgBox "Finded" > End If > > I search a specific column, also found the cell validate whether the given > content, the messages must be retrieved in xBase. Are you talking about a connection to Excel? Is there a connection to Excel already or do you need opening a Worksheet first. You might want to have a look at the Xbase++ samples for that (xppw32\source\samples\activex\msexcel) Peter | |
Peter Alderliesten | Re: Macro in excell on Fri, 21 Sep 2012 20:37:33 +0200 Ribo, I'm not quite sure, but the syntax is not right. Xbase++ uses a ":" where your sample has a "." Try: oSheet:cells:find("110505"):activate() check here for syntax: http://msdn.microsoft.com/en-us/library/office/bb178845(v=office.12).aspx and oSheet:cells:replace("this", "that") check: http://msdn.microsoft.com/en-us/library/office/bb178865(v=office.12).aspx Hope this helps. Peter > Yes, I consider regarding the connection and opening excel with the example > of (xppw32 \ source \ samples \ activex \ msexcel) > . > What I have trouble with the code, I'm trying something like this: > oSheet: Cells.Find (What: = "110505"). Activate > oSheet: Cells.Replace (What: = "OKOKOK") > > But do not get what I need, I'd appreciate me a hand with that. > > regards > Ribo > > > "Peter Alderliesten" escribió en el mensaje de > noticias:ipmzhf7qjqur.4nacqf40uwir.dlg@40tude.net... > > Ribo, > >> I am a neophyte in this topic ActiveX. >> >> Can someone help me with this? >> I need to run this macro in xBase consegurlo but I can not. >> >> Set n = Cells.Find(What:="bolu") >> If n Is Nothing Then >> MsgBox "nay" >> Else >> MsgBox "Finded" >> End If >> >> I search a specific column, also found the cell validate whether the given >> content, the messages must be retrieved in xBase. > > Are you talking about a connection to Excel? > Is there a connection to Excel already or do you need opening a Worksheet > first. You might want to have a look at the Xbase++ samples for that > (xppw32\source\samples\activex\msexcel) > > Peter | |
Ribo Salamanca | Re: Macro in excell on Thu, 04 Oct 2012 13:09:59 -0500 Hello Peter If indeed the syntax is with ":" But I tell you that I could not get out of this jam. oSheet: Cells: Find (What: = "110505"): Activate () Works perfect nRow: = oSheet: Row () nCol: = oSheet: Column () MsgBox ( Str (nRow) + '' + str (nCol)) I need to know the row and column I looked and it is active, but can not find the syntax for this, could you give me a hand please? I tested with oSheet: ActiveCell but or how it works. regards Ribo "Peter Alderliesten" escribió en el mensaje de noticias:t96q4l38cqo6.mzsugsx3dc2m$.dlg@40tude.net... Ribo, I'm not quite sure, but the syntax is not right. Xbase++ uses a ":" where your sample has a "." Try: oSheet:cells:find("110505"):activate() check here for syntax: http://msdn.microsoft.com/en-us/library/office/bb178845(v=office.12).aspx and oSheet:cells:replace("this", "that") check: http://msdn.microsoft.com/en-us/library/office/bb178865(v=office.12).aspx Hope this helps. Peter > Yes, I consider regarding the connection and opening excel with the > example > of (xppw32 \ source \ samples \ activex \ msexcel) > . > What I have trouble with the code, I'm trying something like this: > oSheet: Cells.Find (What: = "110505"). Activate > oSheet: Cells.Replace (What: = "OKOKOK") > > But do not get what I need, I'd appreciate me a hand with that. > > regards > Ribo > > > "Peter Alderliesten" escribió en el mensaje de > noticias:ipmzhf7qjqur.4nacqf40uwir.dlg@40tude.net... > > Ribo, > >> I am a neophyte in this topic ActiveX. >> >> Can someone help me with this? >> I need to run this macro in xBase consegurlo but I can not. >> >> Set n = Cells.Find(What:="bolu") >> If n Is Nothing Then >> MsgBox "nay" >> Else >> MsgBox "Finded" >> End If >> >> I search a specific column, also found the cell validate whether the >> given >> content, the messages must be retrieved in xBase. > > Are you talking about a connection to Excel? > Is there a connection to Excel already or do you need opening a Worksheet > first. You might want to have a look at the Xbase++ samples for that > (xppw32\source\samples\activex\msexcel) > > Peter | |
Peter Alderliesten | Re: Macro in excell on Fri, 05 Oct 2012 10:15:14 +0200 Ribo, > oSheet: Cells: Find (What: = "110505"): Activate () > Works perfect > > nRow: = oSheet: Row () > nCol: = oSheet: Column () > > MsgBox ( Str (nRow) + '' + str (nCol)) > > I need to know the row and column I looked and it is active, but can not > find the syntax for this, could you give me a hand please? > I tested with oSheet: ActiveCell but or how it works. The action :find("110505") returns a "range" object. This object has a row and a column member, which - according to the docs - are the first row and column of this range. So this should work: oRange := oSheet:Find("110505") nRow := oRange:row nCol := oRange:column Peter | |
Ribo Salamanca | Re: Macro in excell on Fri, 05 Oct 2012 12:21:24 -0500 Thanks Peter Understood, one thing to work sheet objects and other objects of the cell. Regards, Ribo "Peter Alderliesten" escribió en el mensaje de noticias:1tlolk50lxi51.jik7521mo2cn.dlg@40tude.net... Ribo, > oSheet: Cells: Find (What: = "110505"): Activate () > Works perfect > > nRow: = oSheet: Row () > nCol: = oSheet: Column () > > MsgBox ( Str (nRow) + '' + str (nCol)) > > I need to know the row and column I looked and it is active, but can not > find the syntax for this, could you give me a hand please? > I tested with oSheet: ActiveCell but or how it works. The action :find("110505") returns a "range" object. This object has a row and a column member, which - according to the docs - are the first row and column of this range. So this should work: oRange := oSheet:Find("110505") nRow := oRange:row nCol := oRange:column Peter |