Thank you works great. Think I confused the issue by rambling on. Much appreciated and thank you for you patience.
Posts by NUBELUBE
-
-
oK Will do when i get home all I want is to get the value from a cell into a userform cant see why you would one the work books but will do it comes as 2 workbooks
Thank you
-
Not sure if this is allowed here is the form in the first work book and the sheet behind it fills in, The check for tool default is the trigger for the code
The userform is called UserToolDetails you can see form and sheet marked 1 and 2. If this breached the rules or is just rubbish please remove the thread thank you
Code- Private Sub BodSearch_Click()
- '1. declare and set variables
- '2. clear old search results
- '3. find records that match criteria and paste them to the report sheet
- Dim wb As String
- Dim sh As String
- Dim path As String
- Dim Link_Table As Worksheet 'where the data is copied from
- Dim Man_Mod As Worksheet 'where the data is put
- Dim Initial_Input As Worksheet
- Dim Manufacturer As String
- Dim Model As String
- Dim i As Integer 'row counter
- Manufacturer = cmbManufacturer.Text
- Model = CmbModel.Text
- path = "C:\Users\Dad\Desktop\Excel\Torque Total Package - V3\"
- wb = "Wrench Data.xlsm"
- sh = "Link_Table"
- Workbooks.Open path & wb
- Sheets(sh).Activate
- Worksheets("Link_Table").Range("X2").Value = Manufacturer
- Worksheets("Link_Table").Range("Y2").Value = Model
- Worksheets("Man_Mod").Range("F2") = Manufacturer
- Worksheets("Man_Mod").Range("G2") = Model
- 'Clear old data from Toolspecific sheet
- Worksheets("Man_Mod").Select
- Worksheets("Man_Mod").Range("Data_Search").ClearContents
- 'goto WrenchData sheet and start seacrhing and copying
- Worksheets("Link_Table").Select
- Worksheets("Link_Table").Range("a1").Select
- finalrow = Cells(Rows.Count, 1).End(xlUp).Row
- 'loop through the rows to find the matching records
- For i = 2 To finalrow
- If Cells(i, 1) = Manufacturer And Cells(i, 2) = Model Then 'if the name matches then search and copy
- Range(Cells(i, 1), Cells(i, 22)).Copy ' copy 19 columns -details
- Worksheets("Man_Mod").Select ' go to to specific sheet
- Range("F20").End(xlUp).Offset(1).PasteSpecial xlPasteFormulasAndNumberFormats ' find the first blank row and paste
- Worksheets("Link_Table").Select 'GO BACK TO WRENCH DATA AND CONTINUE SEARCHING
- End If
- Next i
- Worksheets("Man_Mod").Range("F3:AA12").Copy 'copy the top ten records to calculation ranges
- Worksheets("Selected").Range("b3").PasteSpecial ' paste the top ten records to calculation ranges
- If Worksheets("Selected").Range("B10") = "" Then
- MsgBox ("Not enough Data for BS6789-2-2017")
- End If
- Workbooks("Wrench Data.xlsm").Worksheets("Selected").Range("Select").Copy ' copy calculated values
- Workbooks("Torque Software V3 2020_6_7.xlsm").Worksheets("Variables").Range("B34").PasteSpecial 12 ' paste values to original work book
- '******here is where the code will go to addthen to the use form. Its quite a big work book******
- End Sub
-
Hi,
I have some code that when triggered from a userform searches using 2 combo boxes as the criteria on a different work book, choose the top ten matches perform some simple calculations the paste them into the original workbook as paste special values. works great.(some code from here).
How do I get "them" values into the userform that is still open and eventually into the worksheet that the use for filling in in? No point me posting any code:
A) as I have none for this bit, though have tried.
b) I never get the layout right.
Hope that makes sense. Any help very much appreciated.
-
Re: Check box range on another worksheet
Excellent, fantastic can't thank you enough. Made me very happy. Thanks for your help and patience.
-
Re: Check box range on another worksheet
That is great gets the value briiliant, However if un-ticked the value stays there? Nice if it went when un-ticked.
Much appreciated. -
Re: Check box range on another worksheet
OK I think I have done what you wanted. sorry again did read the rules just did not know what the tags where.
If you think I will be moore trouble than its worth just tell me.
Spent hours looking so far.Many Thanks
-
Re: Check box range on another worksheet
I see see you have taught me something already I really didn't get that. But the code was wrong anyway so tag/colour would be miss leading any way.
think i might stick around a bit longer. Many thanks -
Re: Check box range on another worksheet
sorry don't under stand best if I don't use this site though you do some good stuff all above me iam afraid. thanks
-
Hi I am very much a noob so sorry,
I have looked all over, but when you are not too sure what you are looking for its not easy.
I have 5 work sheets on the first one i have a tick box, When ticked i would like it to take a value
from a cell on sheet three (weights) and but it a cell next to the tick box on sheet 1.
the code I have which I know is wrong as I can't set the range for sheet2 properly.
Any help most welcome.code is:
many thanks