Excel - Another code question

Asked By M
09-Aug-07 04:38 PM
I have the following code: Thats giving me an invalid qualifying error? in
the line: myDirectory.......

Private Sub OK_Click()
Dim myDirectory As String
Dim myFilename As String
Dim myLocationOut As String


If IsEmpty(TAB_DIRECTORY.Value) Then
MsgBox "please provide directory"
Else
myDirectory.Value = Me.TAB_DIRECTORY.Value
End If

If IsEmpty(File_Name.Value) Then
MsgBox "please provide filename"
Else
myFilename.Value = Me.File_Name.Value
End If


If IsEmpty(Location_Out.Value) Then
MsgBox "Provide info "
Else
myLocationOut.Value = Me.Location_Out.Value
End If

Next
UserForm3.Hide
End Sub



The command button "OK" is on userform3
The "TAB_DIRECTORY" is the name of text box1 within userform3
The "File_Name" is the name of textbox2 within userform 3
The "Location_Out" is the name of textbox 3 within userform 3
DIRECTORY.Value
(1)
Macro
(1)
Name.Value
(1)
MyLocationOut.Value
(1)
MyDirectory.Value
(1)
MyFilename.Value
(1)
MyLocationOut
(1)
IsEmpty
(1)
  James_Thomlinso replied...
09-Aug-07 04:50 PM
myDirectory is a string and not an object with a value property so you do not
want to use the .Value qualifier.

myDirectory = Me.TAB_DIRECTORY.Value
--
HTH...

Jim Thomlinson
  M replied...
09-Aug-07 04:54 PM
Thank you so much Jim, one last question about the same macro. Why Im I
getting an error in the "Next UserForm hide"
  M replied...
09-Aug-07 05:00 PM
Oops Ok I figured it out. I guess I dont need that Next statement
Thank You
Create New Account
help
nCon = nBar.Controls.Add(Type: = msoControlButton, Temporary: = True) With nCon .BeginGroup = True .Style = msoButtonCaption .Caption = "Macro" .OnAction = "RunMacro" End With What I would like to do is to remove the above command button "Macro" when the Excel file closes. I have tried to use the following code, and it did not work. Application.CommandBars("Standard").Controls("Macro").Delete Please help. Thanks. Excel Programming Discussions Office (1) Error (1) Excel (1) Worksheet (1) Workbook (1) Module (1) Macro (1) SaveChanges (1) Try identifying the control with a Tag parameter: With nCon .BeginGroup = True Style = msoButtonCaption .Caption = "Macro" .OnAction = "RunMacro" .Tag = "MyTag" '<<<< ADDED End With The text "MyTag" can be anything you want for your response. Basically, I have an Excel file that is just dedicated for a macro, and the Excel macro file will be used by users. The users will open the macro file in the same window as an Excel file where the macro will execute the
mon cas. Caroual Excel - French Discussions WorksheetFunction (1) AddIns (1) Worksheets (1) Excel 2007 (1) Macro (1) Proc (1) LEFT (1) VBA (1) Bonsoir Dans la doc sur HEXBIN, ils ne et un texte" Next ce que tu peux d = E9clencher = E0 l'aide d'une macro qui se charge de l'imp = ort = 20 avant, de fa = E7on que les deux micros. Je l'ai testée chez moi. Elle ne fonctionnait pas, j'ai coché la macro complémentaire Utilitaires d'analyses VBA. et elle a marché, à part le problème de recalcul devrais m'en sortir (pas de lignes vides) Ensuite j'ai retesté en enlevant la macro complèmentaire et elle marchait tout de même. Bref je ne comprends pas trop l'impact de la macro complémentaire. C'est un collègue qui a ce problème mais je n'ai pas accès lui ai donné ta solution de boucle, je lui ai dit que chez moi la macro complèmentaire semblait avoir un impact. . . . Est-il possible de lier une macro complémentaire (ici utilitaires d'analyses VBA) avec son fichier ? Au moins il pourrait s'affranchir de l'existence ou non de cette macro complémentaire sur tous les postes. Merci beaucoup Caroual 4f06cbae$0$8192$426a74cc@news.free.fr
blank to see whether execution stops here or not) 17 The code: - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - Sub markOff() ' ' markOff Macro ' Macro recorded 29 / 09 / 2007 by Balan ' Dim Num As Range Dim Val As Double Dim time to write a script for this dilemma. In my attempts to execute the VBA macro script in excel, i recieved a compile erorr: syntax error which caused the macro not to run. The error occured at this point: Application.Goto Reference: = Worksheets("Sheet1").Cells my PC to this site). Mend them also. Balan! Thanks so much for the amazin macro you wrote. The Macro works as you meant for it to, but unfortunatley it has some shortcomings. First: On a column of data above 250 rows, the macro locks up and freezes and can only be exited by END TASKING excel itself. Second With this dataset, the macro failed to identify all of the pairs, but it did identify 1 set of pairs
Affecter_bouton_dans_la_barre_d'outils_pour_une_macro_complémentaire? Excel Bonjour, Comment affecter un bouton dans la barre d'outils pour une macro compl = E9mentaire? Pour une macro standard pas de probl = E8me ; l'affectation se fait sur le classeur ouvert, mais sur une macro compl = E9mentaire lorsque je veux affecter. . .rien n'apparait! Merci Excel - French Discussions AddIns (1 2010 (1) Excel 2007 (1) Excel 2003 (1) Windows 7 (1) Excel (1) Module (1) Macro (1) Bonjour, Un petit exemple : A ) Ex?cuter une macro "test" situ?e dans un module standard dans le fichier de macros compl?mentaires "MichD xla Sub Bonjour() Application.Run "michd.xla!Test" End Sub B ) Si ta macro dans un module feuille du fichier contenant les macros compl?mentaires tu dois ajouter le Application.Run "michd.xla!Feuil1.Test" End Sub C ) Si le nom de ton fichier macro compl?mentaire contient un espace, On doit entourer le nom du fichier par des guillemets pris le temps de rebaptiser la propri?t? "Name" du projetVBA du fichier de la macro compl?mentaire. Attribue-le d'un nom "unique". MichD - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - a ?crit dans le message de
for the Phone and Email and settin up the range definitions appropriately = if(iserror(vlookup(*name value*, rio, 1, 0)), vlookup(*name value*, fall, 1, 0)) change the column # for address, phone, & email Scusa - Little quick on the send button = if(iserror(vlookup(*name value*, rio, 1, 0)), vlookup name value*, fall, 1, 0), vlookup(*name value*, rio, 1, 0)) Also, if using XL 2007, it