.NET Framework - Variabiliser le nom d'un onglet
Asked By judu75
08-Apr-09 03:44 PM
Bonjour,
Je suis bien bloqué sur le sujet suivant, merci de votre aide !
Je souhaite ouvrir un fichier (variable E) puis sélectionner un onglet
(variable C).
Windows(E).Activate
Sheets(C).Select
Mais, au moment de sélectionner l'onglet, il y a un beug sur la macro: erreur
d'execution 9...
La variable C est alimenté par le code suivant :
C = Cells(B, 4).Value
et la valeur de la cellule (B,4) est un numero à 4 chiffres en valeur (ex :
2542).
Vous savez tout ! Auriez-vous une solution à mon pb ??
Merci
Excel
(1)
VB
(1)
Cordialement
(1)
Variabiliser
(1)
Windows
(1)
Auriez
(1)
Jean-marc replied...
Hello,
Peut être, mais ce forum est consacré à Visual Basic et
pas à Visual Basic pour Application pour lequel il existe des
newsgroups dédiés.
Dans ton cas, les références à des "cellules", à des "onglets"
et à des "macros" semble laisser supposer que tu travailles
avec Excel.
Alors, ta question trouvera certainement réponse sur:
microsoft.public.fr.excel
Cordialement,
--
Jean-marc Noury (jean_marc_n2)
Microsoft MVP - Visual Basic
FAQ VB: http://faq.vb.free.fr/
mailto: remove '_no_spam_' ; _no_spam_jean_marc_n2@yahoo.fr
Foren nutzen. Spamschutz? Hier gab es doch so gut wie keinen Spam. Schade! MfG Susann VB - German Discussions Microsoft Word (1) Windows Server (1) Windows Vista (1) STUDIO one (1) Outlook (1) Office (1) Linux (1) Excel (1) Hallo, *Susann Markward* schrieb am 05.05.2010 15:13: Achso, hier noch der m?ssen uns jetzt nicht durch den ganzen .Net Salat durchw?hlen, um die die VB-Calssic Beitr?ge lesen zu k?nnen. Gru? W. Wolf Hallo, *Horst Heinrich Dittgens* schrieb will. Mal sehen wann wir Deutschen wirklich dran sind. Ich habe mir mal die bestehenden VB-Foren angesehen, die sind exklusiv f?r VB.Net. Ein Forum darf sich am Rande mit VB6 besch?ftigen, es soll bei der Migration zu VB.Net unterst?tzen. Ob M$ neue Foren f?r VB6 und fr?her einrichtet? Die
so. Jetzt "hast" Du das Control, bzw. den Handle des Controls. Du kannst / solltest nun Windows-APIs benutzen, keine managed Control-Klasse, denn es sind ja ggf. unmanged Controls. Die Frage auch die Grenzen und Seiteneffekte von GetWindowText beschrieben. Thorsten D?rfler - - Microsoft MVP Visual Basic vb-hellfire visual basic faq | vb-hellfire - einfach anders http: / / vb-faq.de / | http: / / www.vb-hellfire.de / Hallo Thorsten, . . besagt: to the specified window *or* control." das gilt f?r das so w?re, w?re es dokumentiert. Thorsten D?rfler - - Microsoft MVP Visual Basic vb-hellfire visual basic faq | vb-hellfire - einfach anders http: / / vb-faq.de / | http: / / www.vb-hellfire.de / Hallo Herfried, Die Dokus (AttachThreadInput, GetWindowText) widersprechen sich
Terminus allseits bekannt ist - deshalb hoffe ich, dass es an der Stelle keine großartigen Olaf VB - German Discussions Windows Server (1) Visual Studio (1) Outlook (1) Linux (1) Excel (1) BackgroundWorker (1) W. Wolf (1) VB NET (1) Schmidt <sss@online.de> schrieb im Beitrag Gerade wegen der positiven Stimmen würde ich bei '[VB6]' bleiben (besser noch nur '[VB]'; es unterscheidet von allem bis auf VB.NET, und dafür sollte dann, denke ich, '[VBNET]' verwendet werden). '[VBclassic]' ist m.E. zu Gruppennamen: de.comp.lang.vbclassic de.comp.lang.vbdotnet . . .jetzt folgendes vor: de.comp.lang.vb de.comp.lang.vbnet Meiner Meinung nach sollten wir uns dann aber nicht wundern, wenn vor allem die VB.NET-Newcomer dann zuerst bei uns "anklopfen" . . . so sehr mir der Grund- gedanke dahinter: (ein
effective apps in vb6, I am trying to see if it is worthwhile relearning for vb.net. I have vb express 2008. One of the things I want to do is read old legacy random object. How can I do it in dot.net? How can I do this is vb.net? VB.NET Discussions Visual Studio 2010 (1) Visual Studio (1) Silverlight (1) Windows 7 (1) Office (1) Vista (1) Linux (1) Error (1) HI again all I see there were no solutions to the print problem. Cheers StrandElectric wrote : It is possible in VB.NET using the built in file io functions, but I would suggest you not do files, then for all that is good and right in the universe do not use VB.NET's native FileXXX functions. . . Use the classes from System.IO. Don't do much respectable accounts suite up and running. I am now trying to adjust my thinking to vb.net. Excat syntax and clear instructions is (are) what I need. The replies so far
Use of Mid Statement in VB.Net .NET Framework Hi All If anyone has the time, I think feedback on the eg aba format. The beauty of the old VB6 Mid statement (which is available in VB.Net) is that it allows me to replace n chars at a specified position in mfRecordType Mid(buffer, pointer, MyFields.mfTransactionType ) = "AB" pointer + = mfTransactionType 'etc etc There appears no native VB.Net equivalent to this method. The StringBuilder Class does not have this method either. It as used above) for the Mid Statement in VS (any language)? Thanks for your time. VB.NET Discussions ASCIIEncoding (1) System.Runtime.CompilerServices (1) System.Text.StringBuilder (1) MyFields.mfTransactionType (1 line by a loop: For i = 1 To TotalLength - Text.Length sb.Append(" "c) Actually, VB Mid$ is extremely fast. It seems to be treating the string as an integer array you. He is talking about the vb6 mid statement. . . As for the Mid statement in VB.NET - that maps to Microsoft.VisualBasic.CompilerServices.StringType.MidStmtStr. This method basically takes your string is not clear from your original post, but the Mid statement is still available in VB (.NET) ? (It can also be used from other .NET languages, is well-tested, and is easier than writing from scratch). - - David Anton http: / / www.tangiblesoftwaresolutions.com Convert VB to C#, C++, or Java Convert C# to VB, C++, or Java Convert C++ to