Sheet doesn't display correctly after macro runs

Sheet doesn't display correctly after macro runs

Hi there,

I'm using the following code as part of a macro in one of my sheets, to record information from one worksheet into another:

   Sub LogTaskComplete(ByVal taskName As String)
      Dim currentSheet As String
      currentSheet = ActiveSheet.Name

      Application.EnableEvents = false
      Cells(TITLE_ROW+1, LOG_TASK_COL).value = taskName
      Cells(TITLE_ROW+1, LOG_DATE_COL).value = Now()
      Application.EnableEvents = true      
      Cells(TITLE_ROW+1, LOG_TASK_COL).Font.Bold = False
      Cells(TITLE_ROW+1, LOG_DATE_COL).Numberformat = "h:mm a EEE mmm d, yyyy"
      Cells(TITLE_ROW+1, LOG_DATE_COL).Font.Bold = False   
   End Sub

After running the code, the changes are invisible in the workbook. When I switch tabs within Zoho Sheet to the "Log" worksheet, it is as though nothing has changed (except the line showing the first three rows are frozen is invisible).

The data appears to be stored correctly - because if I reload the whole sheet (by reloading the browser window, or closing the browser tab and opening the Zoho Sheet again) all the data is there. The only way to see any of the newly added data without reloading the page in the browser is to change the font colour or background colour of cells in the "Log" worksheet. I am using Firefox version 87.0 (64-bit).

Is there an extra line I am missing in my VBA code to refresh the screen? Or is this a different problem?

Many thanks,

    • Sticky Posts

    • Announcing IMPORTRANGE and cross-spreadsheet linking in Zoho Sheet

      We are pleased to announce the much-requested IMPORTRANGE function in Zoho Sheet. With this function, you can now link or refer to cell ranges across spreadsheets in an instant.   Refer across spreadsheets You can use IMPORTRANGE just like any other predefined function in Zoho Sheet. Start with an equal sign, select the function, and fill in the parameters. For this function, the source spreadsheet link and the desired cell range to import are given as input.     Once you allow access to the source
    • Tab Colors and New Currency Symbol of Indian Rupee

      Zoho Sheet has recently added support for the following 2 new features: Tab Colors: Since last month, you can set a color to your worksheet tabs. Use colors to quickly identify/highlight specific worksheets or to group similar worksheets together. This option is available on the right click context menu of the worksheet tab. Add color to your worksheets! Indian Rupee Currency - New Symbol: The new Indian Rupee Symbol, ₹, is now supported in Zoho Sheet. This replaces the old "Rs." currency symbol
    • Expanding and securing ways to share your spreadsheet: email as attachment and password protection

      While Zoho Sheet allows you to share and collaborate with your colleagues in real time, you might wish to send your spreadsheets as email attachments or keep an offline version of a confidential file with password protection. Here's how our new options
    • Display text the preferred way with text rotation, indent, and wrapping options

      Working with long, textual data in spreadsheets just got better! Zoho Sheet now supports text rotation, indentation, and wrapping options, which you can use to display the text and other values in your spreadsheet exactly the way you want.   Set the right
    • Dark mode in Zoho Sheet—Work with comfort, night or day

      With working from home becoming more and more common this last year, we at Zoho Sheet understand that conventional working hours for many people across the globe have changed. That's why we're pleased to say we're making it easier for our users to work

            Zoho DataPrep Resources

                Zoho CRM Plus Resources

                  Zoho Books Resources

                    Zoho Subscriptions Resources

                      Zoho Desk Resources

                        Zoho Projects Resources

                          Zoho Sprints Resources

                            Zoho Orchestly Resources

                              Zoho Creator Resources

                                Zoho WorkDrive Resources

                                    Zoho Campaigns Resources

                                      Zoho CRM Resources

                                                  Design. Discuss. Deliver.

                                                  Create visually engaging stories with Zoho Show.

                                                  Get Started Now

                                                      Zoho Writer Writer

                                                      Get Started. Write Away!

                                                      Writer is a powerful online word processor, designed for collaborative work.