Posts by max_lux
-
-
Re: tab textbox to textbox on worksheet
that works! - thanks Andy!
I've never seen that piece of code before, the
more fun to be had! :gift:
gmccreedy - I'm half way built on the userform, and am slowly changing the code over, but these things take time, and i have none, lol
I am assuming I can change that to
or
I can get even more formlike action happening
-
Is this possible? I have tried several variations on this theme
CodePrivate Sub textbox4_SelectionChange(ByVal Target As TextBox) Application.OnKey "{TAB}", "XInsertProc" End Sub
in conjuntion with
CodeSub XInsertProc() If ActiveSheet.Name = "UI" Then Select Case Sheet1.TextBox4.Address Case Sheet1.TextBox4.Address Sheet1.TextBox5.Select'tried .activate here too End Select Else Application.OnKey "{TAB}" End If End Sub
and I have tried variations on
but no luck. The textboxes are 4 and 5 are used for entering passwords. I would like so that once a password is entered in textbox4, that pressing tab or enter will activate textbox 5. Is this possible to do this? I am going to go to a form for this eventually, but I already have a very complicated worksheet that I would like to continue to make use of until I finalize the transition.
Thanks in advance!
-
Re: close a form
if that's a copy paste of your code, there is a spelling mistake, and, I think, procedure unload me should be on a seperate line to work.
should be
-
-
Re: Macro to copy from Word To XL
I'm thinking that if you want it delimited, easiest way would be to paste the text to a temporary txt file, and import it from there
-
Re: Macro to copy from Word To XL
Ok this works for me, though requires two buttons (will not work with one - tried), and it is not delimited, so you might want to add that, as right now it adds all the text into one cell (unless thats what you want)
Code
Display MoreOption Explicit Dim mydata Private Sub CommandButton1_Click() 'Copy all Text To Clipboard Dim appWd As Object Set appWd = CreateObject("Word.Application") appWd.Visible = True appWd.Visible = xlMaximized ChDir "S:\PROJECTS\Paypoint-zone\" appWd.Documents.Open Filename:="S:\PROJECTS\Paypoint-zone\Invoice.rtf" appWd.Selection.WholeStory appWd.Selection.Copy appWd.Application.Quit End Sub Private Sub CommandButton2_Click() 'paste selected text On Error Resume Next Set mydata = New DataObject mydata.GetFromClipboard ActiveCell.FormulaR1C1 = mydata.GetText On Error GoTo 0 End Sub
-
Re: Macro to copy from Word To XL
I've looked into this all day and everything I have found says it can't be done... text must be in raw text format
though if you copied the data to the clipboard and then to sheet it *might* workIf the code to copy to the clipboard is the same for word as it is for excel it shouldn't be too hard
Here is (edited because i use texboxes for this) copy and paste procedures from one of my workbooks. Perhaps you can use this.
Code
Display MoreOption Explicit Dim mydata Private Sub CommandButton1_Click() 'Copy all Text To Clipboard With ActiveCell Set mydata = New DataObject mydata.PutInClipboard End With End Sub Private Sub CommandButton2_Click() 'paste selected text On Error Resume Next Set mydata = New DataObject mydata.GetFromClipboard ActiveCell.text = mydata.GetText On Error GoTo 0 End Sub
-
Re: Populate initial ComboBox.List value
i ca help you so far... in the
Private Sub UserForm_Initialize() add
-
Re: create event procedure using code
Can you post a limited version of what you have?
I am finding that when I run the procedure it places the sub code outside the sub... -
Re: Conditional Format, Dynamic Named Range
I'm thinking this is possible, but would take a good deal of time. I'm sorry but I'm tired as heck, never slept last night....
-
Re: Conditional Format, Dynamic Named Range
two rules i suspect
1) cell >0 set up your cell so borders on three sides
2) cell (below) >0 set up borders two sides
-
Re: Macro to copy from Word To XL
This might give you some ideas...
-
Re: Macro to copy from Word To XL
Apparently not - I imagine it doesn't like the encoding... text files come without it. Your next step would be to use the clipboard, but I'm too tired to get into that right now m8, sorry
Here's my resume, imported, hehe
ÐÏࡱ
-
-
Re: inputing " into a String
select the cell and then run this code - it will tell you the input formula, though i suspect you are going to have to use some variables
Code
Display MoreOption Explicit Sub Get_VBA_Formula() Dim VBA_Formula As String, n$, x$, msg As String Dim i As Integer VBA_Formula = ActiveCell.FormulaR1C1Local 'double quote substitution For i = 1 To Len(VBA_Formula) n$ = Mid(VBA_Formula, i, 1) If n$ = """" Then x$ = x$ & """""" Else x$ = x$ & n$ End If Next i 'Post formula to InputBox VBA_Formula = """" & x$ & """" msg = "Cell Formula to VBA Conversion" & vbCrLf & vbCrLf & ActiveCell.Formula Application.SendKeys ("^c") VBA_Formula = InputBox(msg, "Get VBA Formula", VBA_Formula) End Sub
-
-
Re: VB script to copy values to word
Here's a macro I found somewhere. Perhaps it will help you on your way
Goal: take an Excel file and convert it into a text file with a tilde as the seperator (delimiter).
Solution:
First off, be sure that the text file that you want to add to is already created or you'll get an error.Run this code from the Excel spreadsheet that you want to convert to txt (or .dat or whatever file type you need)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Code
Display MoreSub XLtoTxt() Dim FileNum As Long, i As Long Dim y As Variant Dim lastrow As Integer 'find last used row & assign to variable "lastrow" Range("A1").Select Selection.End(xlDown).Select lastrow = ActiveCell.Row 'find last column & assign to variable "last_col" Range("A1").Select Selection.End(xlToRight).Select last_col = ActiveCell.Column FileNum = FreeFile Open "c:\Example.txt" For Append As #FileNum 'replace this path with the path and name of your file For i = 1 To lastrow With Application.WorksheetFunction y = .Transpose(.Transpose(Range(Cells(i, 1), _ Cells(i, last_col)))) End With Print #FileNum, Join(y, "~") ' replace the tilde with whatever delimiter you like Next Close #FileNum ' close the file End Sub
-
Re: VB script to copy values to word
I don't think that is possible. With excel it's all or nothing... when it comes to transferring data
-
Re: Macro to copy from Word To XL
This one works
sorry its 0700 here and i havent been to bed since 0430 yesterday, 27 hours ago... I'm a little slow...