I do not always like the many ways to solve a problem. Sometimes its hard to find the best way.:(
Thanx for the point of order WillR:yes:
I do not always like the many ways to solve a problem. Sometimes its hard to find the best way.:(
Thanx for the point of order WillR:yes:
Helo Ranger,
Yes I'm sorry, you're wright.
I tried it again and it worked.
Apologize
Fluppe
Hi WillR,
This works and I can use it because the cell can't contain a number.
Thanx
Hi Ranger,
I can't use the ISTEXT function because of the formula =if(A1="";"";A1) excel will format this cell as text when it is blank and will colour it red but the cell must be white when it is blank.
Thanx
Hi,
A cell must change red when it contains text. The cell ie A2 must stay white when it is blank.
The cell contains a link A2=A1
The problem occurs when my cell contains the following formula ie =if(A1="";"";A1).
When A1 is blank A2 is also blank but excel thinks its still text so it is coloured red.
How can I solve this problem.
Any idea?
Thanx,
Fluppe
Hi, Roy
The example you gave me works perfect but I don't think that this is what I need.
I want to store the userform1 in a "mainpage" because I have alot of workbooks that contain the code userform1.show. I don't want to copy the userform to each workbook because when I have to change something on the userform I have to do it a hundred times instead of one time in the "mainpage".
I don't want to open the userform1 in the mainpage and then go to a certain workbook. When I'm in a workbook I want to open the userform stored in the mainpage.
I don't understand the example that Andy gave me.
Thanx
Fluppe
Hi Andy,
Thank you very much for answering my question instead of enjoying your tea break.
Maybe someday I can help you,...
I think I do understand a little more.
Just one little question:
What does the 46 stands for?
vbKey0 To vbKey9, 46
I thought I had to acces the ascii tabel by entering a decimal or hexadecimal number?
So ie. number1 = decimal 49 or hexadecimal 31 ? Am I wrong?
Fluppe :thumbcoo:
Hi Andy,
I'm just learning VB since 2 months and I don't understand your code so good.
I just don't know what I have to change to manipulate the code.
I just tried to change a few words but I actually don't understand what I'm doing.
I want to use the beforeupdate function for a few textboxes on a userform.
When a user enters text instead of a value it must return a msgbox.
Maybe you can give me a tip?
Tanx Abdy :yes:
Fluppe
Hi,
I have tried to change the code in Andy's example in hope that I could use it, but I didn't manage it.
Is there maybe someone who can help me working this out or other suggestions?
thanx,
Fluppe
Hi,
I'm using a userform with several textboxes. I want to check them on userinput.
When the input is text it must return a msgbox, when it's a value it can go on to the next textbox.
I'm using the following code to do the checking.
Private Sub txt1_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
If Not IsNumeric(txt1) Then
MsgBox "test"
Cancel = True
Else
Cancel = False
End If
But do I have to copy the code for each textbox ie txt1 to txt10 or can I use a loop? Any suggestions are welcom.
Thanx very much,
Fluppe :tumble:
Hi,
I have 2 workbooks where some cells of wb2 are linked to cells in wb1.
When i open wb1 A msg is promped with the question : to update all linked information, click yes
to keep the existing info, click no.
Is it possible that excel updates the values immediately without asking me to do it?
thanx,
Fluppe
Thanx Egad
It worked :thumbcoo:
Hi,
I added a workbookexist function to my VBA code. I did something wrong because I can't open the file anymore. Is there a way to re-open it again so I can delete my mistake?
thanx,
fluppe
What do you mean with "mapped"?
I think I have a solution for my problem.
I shall test the footertext on the pathname of the server and then replace it with the text, in this case, P:\.
Hi,
I use the following code to add the pathname in a footer.
Private Sub Workbook_beforePrint(cancel As Boolean)
For Each sht In ActiveWorkbook.Sheets
Ampersand = Chr(38)
Quote = Chr(34)
FooterFormat = "Arial"
FooterTextSize = "8"
FooterText = ActiveWorkbook.FullName
Formatting = Ampersand & Quote & FooterFormat & Quote & Ampersand & FooterTextSize
FOOTER = Formatting & FooterText
sht.PageSetup.LeftFooter = FOOTER
Next sht
End Sub
But sometimes it gives a result like
P:\test\demo.xls and another workbook with the same code gives
\\zwy\public\test\demo1.xls.
Sometimes the code gives the drive letter of the server, in this case P, and on another workbook it gives the fullname of the server.
I want to see the driveletter and not the fullname (P:\test\demo.xls ). How does this come and what can I do about it?
Thanx;
Fluppe
Hi Dave,
I didn't look that good to Willy's suggestion.
My workbook was shared and with unsharing it the problem was solved.
Thanx, and I will try to sleep more this night :yes:
I tried to use the unprotection software and I took a look at the check box for sharing workbook but nothing of this could help.
Still any ideas?
Thanx,
Fluppe