Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Macro Connect all Sheets in SmartView

0

Hello all,

Could you please help me with the automatic connection in all worksheets in an excel file using Smartview? The old essbase had this option. I just connected in one sheet and automatically I would be connected in the whole Excel file.
As I saw, Smartview does not work this way. I made a macro, but it does not work. I have no error on it, but it just does not work. It worked for 1 day and then just all of a sudden it stopped.
I am desperate. I can not connect manually in every sheet otherwise I will go crazy. I am working with very large databases.

Thanks you so much,

(Previous to writing this macro I imported the .bas file to declare all functions as safe)

Public Sub Connect()
   
    Dim wsSheet As Worksheet
   
    For Each wsSheet In ActiveWorkbook.Worksheets
        x = HypConnect(wsSheet.Name, "user", "password", "Connection")
    Next wsSheet
   
End Sub

Answer
Discuss

Answers

0

Hi there!

This may seem like a silly question, but, if it worked the first time, did you make sure the user name and password were not changed in the code?

Also, you could have reached the memory limit for your computer if you are importing too much data at once.

Just some thoughts.

Discuss


Answer the Question

You must create an account to use the forum. Create an Account or Login