Re: Insert Data Validation By Vba
Thanks a lot
with commas it works just the way is should work.
thanks a lot for your help.
Re: Insert Data Validation By Vba
Thanks a lot
with commas it works just the way is should work.
thanks a lot for your help.
Hi all,
I want to insert data validation to a cell by VBA
When i record the macro to put a list (value1;value2;value3) to a Cell the following code is generated and the validation works OK.(dropdown of the 3 values)
Sub Validation_by_VBA()
Range("A2").Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="value1;value2;value3"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub
Display More
If i run this code from VBA I have only [COLOR="Red"]one [/COLOR] value in the dropdown
(value1;value2;value3)
How can i change this code so it will work from vba as well?
thanks in advance.
Kurt.
Re: Open Worksheet With Argument
I thought that opening a worksheet or workbook with argument was excel.
This because I will not only use this from word but also from autoit and batchfiles.
Kurt.
Re: Open Worksheet With Argument
that button does start a macro. But this is a word macro.
How can i start an excel-macro inside the excelbook from a word-macro?
I am also using Autoit for making automated procedures.
Starting up excel workbooks with 1 or more argument should be great without using buttons (and code) from ms-word as well.
Hi all,
I am creating a workbook that will be opened for 2 purposes.
1) By a button on a word-document to create a new documentnumber
A macro create_number() in Workbook_Open() will create a new document number at the last line of sheet1 and copy some field data (user,subject,...)from the word document to the last line in the sheet.
2) Open the workbook from explorer
to have an overview of the created numbers.
[COLOR="red"]PROBLEM[/COLOR]
When i open the workbook from the explorer to have an overview, the create_number() procedure will also start.
Is there a way to avoid this.
With the old msdos batch-files you could work with arguments on the command line to start up a batch file.
Is is possible to do this with excel files.
for example:
Opening [COLOR="Red"]book1.xls [/COLOR]
or
Opening [COLOR="Red"]book1.xls number [/COLOR]
in the create_number() procedure i could check an argument was given and exit the sub immediatly.
sub create_number()
if argument = "number" then
' code to create number
else
exit sub
endif
end sub
does someone know a solution for my problem.
Thanks in advance
KHautekier.
Re: Stop Squares When Adding TextBox Text to Cell
It sure does.
Thanks a lot for your help.
Re: Stop Squares When Adding TextBox Text to Cell
i have attached a small excel-file where you can see the problem and my userform with textbox.
in cell F4 i see
Kurt[]
Frank[]
Do you see this as well.
What is going wrong?
Re: Userform Textbox : Square Block Instead Of Alt-enter
All 3 thing are like you described.
Hi all,
In a userform i have created an textbox.
The user types some text in it and after clicking an OK-Button this text must be copied to a cell
To allow multiple lines (enter = new line in textbox) i have changed the textbox property [COLOR="Red"]EnterKeyBehavior[/COLOR] to [COLOR="red"]True[/COLOR]
The problem is that after copying this textbox1.text to a cell in see square blocks in the cell.
line1[]
line2
instead of
line1
line2
I use the following code to copy the text into a cell:
Private Sub CommandButtonOK_Click()
Dim TextboxText As String
TextboxText = TextBox1.Text
ActiveCell.Value = TextboxText
Unload Me
End Sub
Can someone help me and tell me how to avoid this [] (should be like alt-enter in a cell)
Thanks in Advance.
KHautekier
Re: Macro To Show Messagebox On Open Doc
Sorry,
I'm new to this forum and did not know word and excel were both on this forum.
Re: Macro To Show Messagebox On Open Doc
Mike,
There are 2 ways to run code at startup.
using auto_open (code located in a module)
The other is using Workbook open. (code in Thisworkbook)
Hope this helps you.
Best regards.
Kurt.
Re: Add Arrow To Userform
Thanks
I tried it and it works.
After a little searching it was possible to resize the arrow by changing the property [COLOR="Red"]PictureSizeMode[/COLOR] to [COLOR="red"]1-fmPictureSizeModeStretch[/COLOR].
Best regards.
Khautekier.
Hi,
probably this is easy but i can not find it
i have created an userform and would like to add an arrow (<----->) on it to accentuate something
How can i add an simple arrow or line on a userform
Thanks in advance
Khautekier
Re: Check which user has excel-file open
Hello,
Today i was searching the net for the same problem.
Your post is already 2 years old. But it can help other people as well.
i found a solution at the following hyperlink
http://www.xcelfiles.com/IsFileOpen.html#anchor_37
Best regard.
A learning Belgium guy.