Sign in to follow this  
Followers 0
mattie_boy20

msgbox

9 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Read the helpfile for MsgBox? That's a good start... Look at If/Then conditional statements? That's another good start.

[center]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.[/center]

Share this post


Link to post
Share on other sites

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!!!!???

Share this post


Link to post
Share on other sites

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 Something

EndIf


[center]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.[/center]

Share this post


Link to post
Share on other sites

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 Something

EndIf

Um yes but not with the msgbox thingy. That's the bit i'm having trouble with

Share this post


Link to post
Share on other sites

Um yes but not with the msgbox thingy. That's the bit i'm having trouble with

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.

[center]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.[/center]

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Start by downloading the right program.

AutoIt v3


[center]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.[/center]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0