Issue in VBA

Peter_1985 2,506 Reputation points
2020-10-22T06:51:56.09+00:00

Hi,
I got issue
34148-2p.png
due to last line below. How to correct it?
Str0 = Trim(Worksheets("B").Cells(Ser0, 4).Value) & "_D": Worksheets("B").Cells(Ser0, 27).Value = Str0

            sAddress = "c:\1\" & Str0 & ".xlsx": W0 = Str0 & ".xlsx": F2 = Str0  
            Workbooks.Add.SaveAs Filename:=sAddress: Set rCell = Worksheets("B").Cells(Ser0, 27)  
              
            'sDisplay = "F2.xlsx"  

            ActiveSheet.Hyperlinks.Add Anchor:=rCell, _  
                Address:=sAddress  
                'TextToDisplay:=sDisplay  
              
            Dim ws1 As Worksheet  
            Set ws1 = ActiveWorkbook.Worksheets.Add(Type:=xlWorksheet)  
            With ws1  
                If Not WorksheetExists(Str0) Then  
                    .Name = Str0  
                End If  
            End With  
              
            Windows(Curr_Bk).Activate  
            'Worksheets(Str0).Activate  
            Fill_Border "A1:A1": Worksheets(Str0).Cells(1, 1).Value = "Back"  
Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,828 questions
Office Management
Office Management
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Management: The act or process of organizing, handling, directing or controlling something.
2,000 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,641 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Laude 85,651 Reputation points
    2020-10-22T06:56:36.577+00:00

    Hi @Peter_1985 ,

    VBA is currently not supported in the Q&A forums, the supported products are listed over here https://learn.microsoft.com/en-us/answers/products (more to be added later on).

    You can ask the experts in the dedicated VBA forum over here:
    https://social.msdn.microsoft.com/Forums/en-US/home?forum=isvvba

    ----------

    (If the reply was helpful please don't forget to upvote or accept as answer, thank you)

    Best regards,
    Leon

    0 comments No comments

0 additional answers

Sort by: Most helpful