Inventory Sheet

Inventory Sheet

I need to get this VBA script running. It works fine in excell, but when i transfer it over to the Zoho spreedsheet it is completely broken, Basically the way it worked in excel is that you would click on a a cell in column L and the macro would enter all information from columns G-J into the activity log and add or subtract the amount of the item from the main inventory form. Right now the marco'ed enter button does not work. it wont transfer the date and it doesnt reckonize the index number that is progressive. So it just put the information into line 3 of inventory activity log. It also changes the input field into a date time field.....

Private Sub fConfirm_Click()
Dim NewRow As Integer
NewRow = Worksheets("main").Range("B3").Value + 1

If Len(MyForm.fName.Value) = 0 Then
MsgBox "The name field can not be left empty!", vbOKOnly, "MeadInKent"
MyForm.fName.SetFocus
Exit Sub
End If

Worksheets("table").Cells(NewRow, 1).Value = MyForm.fName.Value
Worksheets("table").Cells(NewRow, 2).Value = MyForm.fAmount.Value
Worksheets("table").Cells(NewRow, 3).Value = DateValue(MyForm.fDate.Value)

MyForm.Hide
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)

Dim thisRow As String
Dim thisColumn As String
thisColumn = Target.Column
thisRow = Target.Row

If thisColumn = "12" Then

    If thisRow <> False Then
        Dim NewRow As Integer
        NewRow = Worksheets("Form").Range("N1").Value + 1
        If Worksheets("Form").Range("u" + thisRow).Value = 0 Then
            MsgBox "There are errors. No data has been added!", vbOKOnly, "-WTG"
            Exit Sub
        End If
       
        Sum = Val(Worksheets("form").Range("E" + thisRow).Value) + Val(Worksheets("form").Range("G" + thisRow).Value)
        Worksheets("Active Inventory").Range("E" + thisRow).Value = Sum
   
        Worksheets("Inventory Activity Log").Cells(NewRow, 1).Value = Worksheets("form").Range("A" + thisRow).Value
        Worksheets("Inventory Activity Log").Cells(NewRow, 2).Value = Worksheets("form").Range("B" + thisRow).Value
        Worksheets("Inventory Activity Log").Cells(NewRow, 3).Value = Worksheets("form").Range("C" + thisRow).Value
        Worksheets("Inventory Activity Log").Cells(NewRow, 4).Value = Worksheets("Active Inventory").Range("E" + thisRow).Value
        Worksheets("Inventory Activity Log").Cells(NewRow, 5).Value = Worksheets("form").Range("F" + thisRow).Value
        Worksheets("Inventory Activity Log").Cells(NewRow, 6).Value = Worksheets("form").Range("G" + thisRow).Value
        Worksheets("Inventory Activity Log").Cells(NewRow, 7).Value = Worksheets("form").Range("H" + thisRow).Value
        Worksheets("Inventory Activity Log").Cells(NewRow, 8).Value = Worksheets("form").Range("I" + thisRow).Value
        Worksheets("Inventory Activity Log").Cells(NewRow, 9).Value = Worksheets("form").Range("J" + thisRow).Value
       
       
        MsgBox "New Data added", vbOKOnly, "-WTG"
        Worksheets("form").Range("G" + thisRow).ClearContents
        Worksheets("form").Range("H" + thisRow).ClearContents
        Worksheets("form").Range("I" + thisRow).ClearContents
        Worksheets("form").Range("J" + thisRow).ClearContents
        Worksheets("form").Range("N1").Value = NewRow
        Worksheets("form").Range("G" + thisRow).Select
        End If
    End If
End Sub




























































    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation
                                              • Sticky Posts

                                              • Slicers are now available in Zoho Sheet—filter your data interactively

                                                At Zoho Sheet, we diligently track user requests and feedback. In line with this, based on extensive user requests, we've integrated Slicers to pivot tables and are delighted to announce its release. Slicers are interactive visual filters that have add,
                                              • Check out the new Checkbox in Zoho Sheet

                                                Checkbox, the simple GUI widget that lets you choose between two mutually exclusive options i.e Yes or No, is now in Zoho Sheet. Having made it across the web, Checkbox is familiar but is still elusive to most spreadsheet software. Special developer ribbons, macros and all other complexities to add a checkbox to a spreadsheet? Not in Zoho Sheet. How to add Checkbox to Zoho Sheet? Adding a Checkbox in Zoho Sheet is simple. Select a cell/range and choose "Checkbox" in "Input Controls" under the Format
                                              • Format and analyze spreadsheet data with Zoho Sheet's Table

                                                While a spreadsheet helps you compile data for easy analysis, formatting helps make your data more comprehensible. We are happy to announce the release of Table, a crucial tool for improving data formatting in Zoho Sheet. More than a formatting tool,
                                              • Introducing Data Bars: Graphically represent changes in data within the cells

                                                Conditional formatting has helped millions of spreadsheet users analyze and highlight their data more efficiently. In addition to the classic rules, color scales, and icon sets available in Zoho Sheet, you can now apply Data Bars, a convenient method
                                              • Zia in Zoho Sheet now makes suggestions on conditional formats, picklists, and checkboxes

                                                Zia, Zoho's popular AI assistant, has been helping users succeed across Zoho applications since inception. In Zoho Sheet, Zia helps users efficiently build reports and analyze data with recommendations about data cleaning, charts, and pivot table. Also,


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now