mattie_boy20 Posted September 9, 2006 Share Posted September 9, 2006 Hey I want to create a macro so msgboxes come up asking if a person is present. If i press 'Yes' an 'x' is inserted into a cell, if i press 'No' an 'a' is inserted into the same cell. Any idea on how to do this? xx Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 9, 2006 Moderators Share Posted September 9, 2006 Hey I want to create a macro so msgboxes come up asking if a person is present. If i press 'Yes' an 'x' is inserted into a cell, if i press 'No' an 'a' is inserted into the same cell. Any idea on how to do this? xxRead the helpfile for MsgBox? That's a good start... Look at If/Then conditional statements? That's another good start. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
mattie_boy20 Posted September 9, 2006 Author Share Posted September 9, 2006 Read the helpfile for MsgBox? That's a good start... Look at If/Then conditional statements? That's another good start.Well I have looked at all of them and i don't really understand it! Can anyone just post some coding on here for me please!!!!??? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 9, 2006 Moderators Share Posted September 9, 2006 Well I have looked at all of them and i don't really understand it! Can anyone just post some coding on here for me please!!!!???There is an example provided, maybe you should just say what you don't understand.MsgBox() has a return value, those values are one of the first things you see... if you only have an OK button then the value returned is 1, if you have a yes and no button then the return for yes is 6 and no is 7.Do you understand how to use If/Then?If Condition = Value Then;Do SomethingEndIf Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
mattie_boy20 Posted September 9, 2006 Author Share Posted September 9, 2006 There is an example provided, maybe you should just say what you don't understand.MsgBox() has a return value, those values are one of the first things you see... if you only have an OK button then the value returned is 1, if you have a yes and no button then the return for yes is 6 and no is 7.Do you understand how to use If/Then?If Condition = Value Then;Do SomethingEndIfUm yes but not with the msgbox thingy. That's the bit i'm having trouble with Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 9, 2006 Moderators Share Posted September 9, 2006 Um yes but not with the msgbox thingy. That's the bit i'm having trouble withGeeze... try something, and if it fails post it... I'm not just going to give you the answer (I've already done that) without seeing some effort on your part. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
mattie_boy20 Posted September 9, 2006 Author Share Posted September 9, 2006 Geeze... try something, and if it fails post it... I'm not just going to give you the answer (I've already done that) without seeing some effort on your part.Right this is as far as i've got then:ActiveSheet.Unprotect Application.Goto Reference:="Date1" Selection.Copy Application.Goto Reference:="Date" Selection.Insert Shift:=xlToRight Selection.ColumnWidth = 2.29 Selection.Font.ColorIndex = 0 Selection.Locked = True Selection.FormulaHidden = False Application.CutCopyMode = False With Selection .HorizontalAlignment = xlGeneral .VerticalAlignment = xlBottom .WrapText = False .Orientation = 90 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With Range("Date").Select ActiveCell.Offset(1, -1).Select MsgBox "Is Ben Allen Present?", vbYesNo If = 6 Then ActiveCell.Insert 'x' End If Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 9, 2006 Moderators Share Posted September 9, 2006 Start by downloading the right program.AutoIt v3 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
GaryFrost Posted September 9, 2006 Share Posted September 9, 2006 Didn't know we supported VB here also SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now