Results 1 to 5 of 5

Thread: SSTab

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    Cleveland,Oh
    Posts
    95

    SSTab

    Hi All:
    Please help!!
    I have a SStabl and in here there are two tabs. I have a control array that I use to add controls at run time. My controal array adds the controls in the sstab depending on the tab index.

    I.E. Controls.Add "VB.Frame", Av_sFrame, TabSetup
    My user want their changes to be saved when they click to tab 2 if the current tab was 1. And if the user is on tab 2 and made some changes as the changes should be saved when the user click to tab 2.

    My problem is that if the user made changes while the he/she was in tab 1 and click tab 2, the TabSetup is 2 and not 1. Thus the changes on tab 1 are saved and not 2. How can I overcome this case. I want to set the sstab(TabSetup in my case) tab to what ever the tab was when the user made changes and after saving the changes than go the next tab.

    I hope I explained this properly to you guys, because I need help and I am stuck.

    Thanks
    ZA

    Zus

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    If I understand correctly, then I would suggest that you could
    disable the changing of the tabs, only when changes are made,
    unless the user saves the changes on the current tab first. Then
    same logic on the other tabs.

    HTH
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    Cleveland,Oh
    Posts
    95

    ssTab

    Hi RobDog888:
    I will try doing that and let you know the outcome.

    Thanks
    Zus

  4. #4
    Hyperactive Member
    Join Date
    Jun 2004
    Posts
    468
    When the user clicks on a different tab, the tab's click event tells you what the previous tab was. Use this information to decide which data to save:
    Code:
    Private Sub SSTab1_Click(PreviousTab As Integer)
      'Save changes for tab: PreviousTab
    End Sub

  5. #5

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    Cleveland,Oh
    Posts
    95

    resolved:sstab

    Thanks guys for all the help you have given me.

    Zus

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width