Msg Box Question

ryan_law2000

Well-known Member
Joined
Oct 2, 2007
Messages
738
Here is what I want to do

When you click on "REMOVE" found in cell A4 I would like a MSG Box to appear saying
"Please Enter Shipping Out Information"
"New Ticket #" then a box to fill in
"Location" then a box to fill in
"DATE" then box to fill in

then at the bottom, a "Cancel" and "Transfer Item"

When this info is filled out and the transfer button is pressed I would like it to cut the full row then transfer that line to a different sheet, pasting that line on the next available line on that sheet and also adding "NEW TICK #", "Location" and "Date" to the new sheet... These New Colums will already have the titles and the colums to paste the info.

Any ideas out there on how to do this? It sounds like i will need to create a userform but as for the transfering and cuting the line im really lost
 
Here is my full code, Im still completly lost to why it cuts each row below the selected row as well.

Under my Tab Code for Sheet 1 :

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
UserForm1.Show
End Sub


Under my userform1:

Private Sub CommandButton1_Click()
Dim i As Long
For i = 1 To 4
Sheets("SHELL OUT").Cells(Rows.Count, i).End(xlUp).Offset(1) = Me.Controls("TextBox" & i).Value

Range(Cells(ActiveCell.Row, "B"), Cells(ActiveCell.Row, "M")).Cut Sheets("SHELL OUT").Cells(Rows.Count, "E").End(xlUp).Offset(1)
ActiveCell.EntireRow.Delete

Next i
Unload Me
End Sub


Private Sub CommandButton2_Click()
Unload Me
End Sub


Any ideas on why all the rows with information get cut below the selected row as well???
Im completly lost here, I could always email a copy if someone wants to take a look at it
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
I have found out why the cell always refernced the one above it and thats because my hyperlink cell refernce was not correct, I have fixed this now... but it still not working for me.... It's still cuting every cell below the one i want

Acording to this formula i have no idea why this is happening

Is there a way of showing you my form?
 
Upvote 0
Ok Sorry to keep adding to this but I have a little more information...
I have added more information to Sheet 1 (6 lines)
now when I click the hyperlink and fill the userform out it does not cut all the rows with info... only the three below it (cuting and delting a total of 4 rows)
 
Upvote 0
OK I HAVE FOUND THE PROBLEM... Finally!

I have changed one this on the code then it only selects the one row, cuts then deletes
here it is:

Private Sub CommandButton1_Click()
Dim i As Long
For i = 1 To 4 ****I CHANGED THIS TO = 1 TO 1****
Sheets("SHELL OUT").Cells(Rows.Count, i).End(xlUp).Offset(1) = Me.Controls("TextBox" & i).Value

Range(Cells(ActiveCell.Row, "B"), Cells(ActiveCell.Row, "M")).Cut Sheets("SHELL OUT").Cells(Rows.Count, "E").End(xlUp).Offset(1)
ActiveCell.EntireRow.Delete


The only problem with changing that code above now is that it only takes information from one of the cells in the userform instead of all four... BUT it only cuts,delets and pastes the row i want... So it's sooooooo lcose to working now
Any Ideas from here?
 
Upvote 0
OK DONE!!! For anyone who has been reading this here is what i did to make it work:
ALL I did was changed the order of the formula then it worked! YES
Thanks everyone for you help


Private Sub CommandButton1_Click()
Dim i As Long

Range(Cells(ActiveCell.Row, "B"), Cells(ActiveCell.Row, "M")).Cut Sheets("SHELL OUT").Cells(Rows.Count, "E").End(xlUp).Offset(1)
ActiveCell.EntireRow.Delete

For i = 1 To 4
Sheets("SHELL OUT").Cells(Rows.Count, i).End(xlUp).Offset(1) = Me.Controls("TextBox" & i).Value

Next i
Unload Me
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,093
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top