Thanks for ur reply....Actually i need the command textbox 1 will be storing data in next column of the finded row so for that that entering cell was in blank or not that i need to confirm..if value is there i have select other row..i done little bit but it was not not exactly working..
Posts by Baski007
-
-
Hi all,
In the below i have to find the value in sheet based on textbox 2 and i have to enter the textbox 1 value into the next column.. So for that i have to check the cell next cell was blank or not..with this command i cant execute that msg function so can someone suggest the solution...check the highlighted part.
Code
Display MorePrivate Sub CommandButton1_Click() Dim Storage As String Dim mothercoilID As String Dim rng As Range Dim rownumber As String Storage = TextBox2.Text x = 2 Do While Sheet3.Cells(x, 1) <> "" Set rng = Sheet3.Columns("A:A").Find(What:=Storage, searchorder:=xlByRows) If rng Is Nothing Then MsgBox "Row Number not found" GoTo ende Else Dim rng1 As Range rownumber = rng.Row Set rng1 = Sheet3.Cells(rownumber, 2) If rng1 Is Nothing Then mothercoilID = TextBox1.Text rng1.Value = mothercoilID Else MsgBox "row is not empty" End If End If Loop ende: End Sub
-
hi all,
Need a demo workbook for QR code generation in excel vba ..can someone suggest
-
-
anyone having solution???
-
Because i will download from other link so it will get as 1,2,3....soon so i have to give out the name for all the invoices as particular name using textbox.
-
Actually for my project I'm having a multiple pdf invoices so for that i have to select and rename that file..inspite of that i have to do the selection by using vba and based on path and file name i given in textbox it has to save in that folder.
-
hi all,
i need a command for saving the existing pdf file as to save new name based on the textbox value in userform and saving into specific path as pdf.
-
thanks for the reply...find the sample workbook attached
-
Hi all,
find the attachement in that i was selecting one row but in th textbox it getting sum all the column values..i cant find why it was happening in this.. earlier it was worked fine now it was occuring like this..
-
Thanks for ur reply..It was getting sum on not selected values in the listbox sir..This was the problem again it was occuring..
-
Hi all,
In the below command I was getting the sum values of all the values that was displayed in the listbox...I want the command to run as selected values in listbox to get sum and displaying in the textbox but once i run the program it displaying sum all the values displayed in the listbox.. can suggest any solution.
Code
Display MorePrivate Sub CommandButton1_Click() Dim i As Long Dim sum As Double Dim sum1 As Double Dim sum2 As Double If Me.ListBox1.Selected(i) = True Then With Me For i = 0 To Me.ListBox1.ListCount - 1 sum = sum + Val(Me.ListBox1.List(i, 4)) sum1 = sum1 + Val(Me.ListBox1.List(i, 5)) sum2 = sum2 + Val(Me.ListBox1.List(i, 6)) Next i Me.TextBox6.Text = sum & ".00" Me.TextBox8.Text = sum1 & ".00" Me.TextBox9.Text = sum2 & ".00" End With End If End Sub
-
Thanks for u reply mr.dangelor... it worked fine..
-
Hi all,
I tried with the below command and i can't paste the selected values in listbox to a new workbook. with that command i can open the workbook but the selected values are not pasting in the new workbook. can suggest any solution.
Code
Display MorePrivate Sub CommandButton2_Click() Dim wkb As Workbook 'Adding New Workbook Set wkb = Workbooks.Add Dim i As Integer With wkb .Worksheets("Sheet1").Activate End With r = 1 For i = 1 To ListBox1.ListCount - 1 If Me.ListBox1.Selected(i) Then With Sheet1 .Cells(r, 1).Value = Me.ListBox1.List(i, 0) .Cells(r, 2).Value = Me.ListBox1.List(i, 1) .Cells(r, 3).Value = Me.ListBox1.List(i, 2) r = r + 1 End With End If Next End Sub
-
Thank u sir..It's worked correctly for what i need..
-
can suggest some command modification for the above error code?
-
ok sir... find the attached file of workbook..In that i have a user form with one text box in that i have to enter the value into the sheet 2 of column A and i have a upload option of file to store in column B to soon...but for now example i have created data in column B.. So whenever i enter the data in lastrow of A i have to autofill the data upto the lastrow of column B.
-
Thanks for replying...actually code is for already i have a data in sheet of column B by using another userform i will upload that data..Now with this code i want to enter the data in the last used row of the column by using textform from that activecell i have to autofill till lastrow of the column B sir..Now i tried some range i cant find the exact range to get filled from the activecell till lastrow of the column B.
-
Hi all,
can some one suggest the idea to clear this code for the range of activecell that was selected and lastrow.
Code
Display MorePrivate Sub CommandButton2_Click() Dim irow As Long Dim activeworksheet As Worksheet Dim lastrow As Long irow = activeworkbook.Worksheets("sheet2").Cells(Rows.Count, 1).End(xlUp).Row + 1 lastrow = Cells(Cells.Rows.Count, "B").End(xlUp).Row Set activeworksheet = ThisWorkbook.Worksheets("sheet2") With activeworksheet .Cells(irow, 1) = UserForm1.TextBox1.value .Cells(irow, 1).Select Selection.AutoFill Destination:=range(activecell & lastrow) End With End Sub
-
thank u sir...i will find it!!