All about VBA and PALO

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • RE: All about VBA and PALO

    if u insert the vba package to the modules don't call the module palo.
    If the name is used there are Problems in Excel while using it. Palo functions like ecount.... didn't work in that workbook anymore. Afterchanging to a different name it worked.
    It seems the word Palo is kind of reserved and shouldn't be used as module name.
  • I'm using that class modul in my application without problem. You must import the file into your project as class module (for example "cPalo") and declarate it in "main" module as "Public Palo As New cPalo". Then you can use it Palo.<<function>> (for example "iChildrenCount = Palo.eChildCount(sServer, sDrillDimension, sElementCode)".
  • Hi Vesi

    Thanks for that - good idea to have a VBA code area

    I have been hacking away at a macro to allow data to be copied over palo.data cells (it's a wet and cold winter Saturday here)

    I have attached it in case it's useful to anybody - The code is not very elegant but it sort of works - feel free to improve it if you can and then repost it!

    On reflection - maybe we need a whole topic for VBA - not just a thread - Stephanie what do you think?
    Files
    • Palo Copy.zip

      (32.64 kB, downloaded 1,450 times, last: )
    Best wishes

    John Hobson
    The Planning Factory, Lytham, UK
    www.planfact.co.uk

    The post was edited 1 time, last by Pommie ().

  • OK - it was a VERY wet weekend so I tarted this up a bit more and added some more functionality .

    For most users the ability to bring data directly into Excel is a major benefit of Palo. However, this approach it is not without its attendant problems.

    * Users can inadvertently delete the PALO.DATAC() formulae
    * Users can copy values from other parts of the sheet destroying the PALO.DATAC formulae in the process
    * Users can try to copy data from one PALO.DATAC() formula to another and don’t understand why copying the PALO.DATAC formula doesn’t copy the value too.

    I have created a workbook that you can use as a starting point (a template) when you want to give your users the possibility of using PALO views with added protection and additional functionality.

    Simply load the workbook, which only has a single tab. Use this tab as the target for your PALO Paste View and you will find that:

    1. Drag and drop functionality, cut, copy, paste and paste special menu items and shortcut keys have all been disabled so you can’t delete, or copy over the PALO.DATAC formulae by mistake. They are only disabled in this workbook. Other workbooks that may be open will still function normally. (Although we would generally advise that you close other workbooks wherever possible when working with Palo views)

    2. All entries to the PALO data area are validated so that you can only enter numbers, data spreads, “LIKE”s, “COPY”s or =Palo... formulae. In the current version you can’t enter text into string elements in a protected sheet.

    3. You can copy values from one cell to another Palo.Data cell using the special Palo Copy button. Just put your cursor on the source value in a single cell, and then press the Palo Copy button. Select your target range and click OK - the value is now copied but the PALO formulae are unaffected.

    If you would like a copy please visit:

    planfact.co.uk/html/palo_protect_and_copy.html

    Please Note: The TPF Jedox Palo Protect and Copy Workbook is provided with no warranty (implied or otherwise). Your use of this free resource is entirely at your own risk. Your use of the resource implies your acceptance of these terms.

    Hope this is useful :D
    Best wishes

    John Hobson
    The Planning Factory, Lytham, UK
    www.planfact.co.uk

    The post was edited 1 time, last by Pommie ().

  • Hi vesi,

    what is "Application.Run("PALO.ENABLE_LOOP", True)" doing? I would like to import elements of dimensions with VBA by looping through a recordset. So I am wondering what palo.enable_loop is made for.

    How do I delete all the data (not structures) in the cube before using SetData? I would recreate the dimensions first, will this already delete all data of the cube? EADD has a "clear" parameter, SetData has none. I am wondering how I could run the "clear cube" function of the GUI within VBA code (in case i do not recreate the dimensions).

    There would be a function "http://[SERVER]:[PORT]/cube/clear[?PARAMETER1=value[&...]]" but I do not know how to use this with VBA (already to retreive the session id is tricky).

    regards

    arno

    The post was edited 1 time, last by cavallo ().

  • Hi Cavallo,
    how did you get the session id?

    I tried "http://localhost:7777/server/login?sid=0000&user=admin&password=admin&sid=" , but it did not work, neither "http://localhost:7777/server/login?sid=0000&user=admin&password=admin" .
    Actually I am newbie in this stuff....

    Thanks for your help
    Stanza
  • sorry, I mislead you. I have no clue how this API stuff works, too. As far as I can remember, I could retreive the session ID with the default admin user and password, I found a sample here in the forum. The result was a number shown by the browser (*g* very impressive *g*). I do not know how this can be used, however, you could manipulate the cubes with it.

    Maybe somebody could shed a light on this.

    arno

    ps. maybe the password was encrypted

    The post was edited 1 time, last by cavallo ().

  • Hello Holger,

    I can hardly imagine how this should work. Can you give as a full example of eg. how to clear all data from the demo cube? I mean, typing the whole command into a browser (first encrypting the password with some software) is fairly complicated.

    Will this be done by building a website with links? So that I can click on whatever action I would like to happen?

    Or can the http... "command" be "fired" eg. from VBA or some other programming language?

    regards

    arno
  • Sorry the Link was truncated in the first post:
    Must look like this:
    "http://localhost:7778/server/login?user=admin
    &password=21232f297a57a5a743894a0e4a801fc3&sid="

    So you get a response like
    zqAO;3600;

    then you could e.g. partially clear the sales cube with
    "http://localhost:7778/cube/clear?sid=zqAO
    &database=1&cube=7&area=0:1,1:2,2:3,3:4,0,0"

    then next operation and so on

    You can read about api-functions here:
    "http://localhost:7778/api"
    or here
    "http://localhost:7778/api/example.html"

    Make sure to have an entry
    admin "127.0.0.1" 7778

    in your palo.ini


    I think you can fire them from whereever you like.

    Hope this helps

    Holger

    The post was edited 5 times, last by h_decker ().

  • Thanks Holger, but

    Hi Holger,

    thank you very mutch for your help. It workes!
    But one more question: Is ist possible to put all these http stuff in a VBA script to automate some things like the creation of a database?

    By the way: I am "Kölner", too, and adore the FC ("Aufstiegsplatz!") :)

    Bye
    Stanza

    The post was edited 1 time, last by Stanza ().

  • I found the hint in google, try:


    Private Sub Command1_Click()
    Dim HttpReq As New MSXML2.XMLHTTP40
    HttpReq.Open "GET", "http://localhost:7777/server/login?
    user=admin&password=21232f297a57a5a743894a0e4a801fc3&sid=", False
    HttpReq.send
    MsgBox HttpReq.responseText
    End Sub

    Be sure, that reference "Microsoft XML, v5.0" is enabled.

    Bye
    Stanza
  • Function for enable/disable Behavior palo add-in ver.2 using VB/VBA

    declaration
    Public Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
    Public Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
    Public Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long
    constans
    Public Const REG_NONE As Long = 0
    Public Const REG_SZ As Long = 1
    Public Const REG_BINARY As Long = 3
    Public Const REG_DWORD As Long = 4
    Public Const HKEY_CLASSES_ROOT As Long = &H80000000
    Public Const HKEY_CURRENT_USER As Long = &H80000001
    Public Const HKEY_LOCAL_MACHINE As Long = &H80000002
    Public Const HKEY_USERS As Long = &H80000003
    Public Const HKEY_PERFORMANCE_DATA As Long = &H80000004
    Public Const HKEY_CURRENT_CONFIG As Long = &H80000005
    functions
    Sub SaveRegKey(hKey As Long, strPath As String, strValue As String, strData As String)
    Dim hndREG
    RegCreateKey hKey, strPath, hndREG
    RegSetValueEx hndREG, strValue, 0, REG_DWORD, ByVal strData, 4
    RegCloseKey hndREG
    End Sub
    commands
    enable)
    Call SaveRegKey(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Office\Excel\Addins\Jedox.Palo.XlAddin.Connect", "LoadBehavior", Chr(3))
    disable)
    Call SaveRegKey(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Office\Excel\Addins\Jedox.Palo.XlAddin.Connect", "LoadBehavior", Chr(0))

    You have to enabled "Start automatically with Excel" in palo setting as default. For editing registry you have to logged with administrator rights on local computer.

    The post was edited 4 times, last by vesi ().

  • Copy and Paste in Palo Excel Worksheet - part 1

    Hi,
    this is my code for copy (ctrl+c) numeric value from excel (and other source txt, csv, atc.) to palo excel addin using VBA (ctrl+m)

    Private Declare Function IsClipboardFormatAvailable _
    Lib "user32" _
    (ByVal uFormat As Long) As Long
    Private Declare Function OpenClipboard _
    Lib "user32" _
    (ByVal Hwnd As Long) As Long
    Private Declare Function GetClipboardData _
    Lib "user32" _
    (ByVal uFormat As Long) As Long
    Private Declare Function GlobalSize _
    Lib "kernel32" _
    (ByVal hMem As Long) As Long
    Private Declare Function GlobalLock _
    Lib "kernel32" _
    (ByVal hMem As Long) As Long
    Private Declare Sub MoveMemory _
    Lib "kernel32" Alias "RtlMoveMemory" _
    (ByVal strDest As Any, _
    ByVal lpSource As Any, _
    ByVal Length As Long)
    Private Declare Function GlobalUnlock _
    Lib "kernel32" _
    (ByVal hMem As Long) As Long
    Private Declare Function CloseClipboard _
    Lib "user32" () As Long
    Private Declare Function GlobalAlloc Lib "kernel32" (ByVal uFlags As Long, ByVal dwBytes As Long) As Long
    Private Declare Function EmptyClipboard Lib "user32" () As Long
    Private Declare Function SetClipboardData Lib "user32" (ByVal uFormat As Long, ByVal hData As Long) As Long
    Private Declare Function GlobalFree Lib "kernel32" (ByVal hMem As Long) As Long
    Private Const GMEM_MOVABLE = &H2&
    Private Const GMEM_DDESHARE = &H2000&
    Private Const CF_TEXT = 1
    'Error return codes from Clipboard2Text
    Private Const CLIPBOARDFORMATNOTAVAILABLE = 1
    Private Const CANNOTOPENCLIPBOARD = 2
    Private Const CANNOTGETCLIPBOARDDATA = 3
    Private Const CANNOTGLOBALLOCK = 4
    Private Const CANNOTCLOSECLIPBOARD = 5
    Private Const CANNOTGLOBALALLOC = 6
    Private Const CANNOTEMPTYCLIPBOARD = 7
    Private Const CANNOTSETCLIPBOARDDATA = 8
    Private Const CANNOTGLOBALFREE = 9
    Function SetText(strText As String) As Variant
    Dim varRet As Variant
    Dim fSetClipboardData As Boolean
    Dim hMemory As Long
    Dim lpMemory As Long
    Dim lngSize As Long

    varRet = False
    fSetClipboardData = False

    ' Get the length, including one extra for a CHR$(0)
    ' at the end.
    lngSize = Len(strText) + 1
    hMemory = GlobalAlloc(GMEM_MOVABLE Or _
    GMEM_DDESHARE, lngSize)
    If Not CBool(hMemory) Then
    varRet = CVErr(CANNOTGLOBALALLOC)
    GoTo SetTextDone
    End If

    ' Lock the object into memory
    lpMemory = GlobalLock(hMemory)
    If Not CBool(lpMemory) Then
    varRet = CVErr(CANNOTGLOBALLOCK)
    GoTo SetTextGlobalFree
    End If

    ' Move the string into the memory we locked
    Call MoveMemory(lpMemory, strText, lngSize)

    ' Don't send clipboard locked memory.
    Call GlobalUnlock(hMemory)

    ' Open the clipboard
    If Not CBool(OpenClipboard(0&)) Then
    varRet = CVErr(CANNOTOPENCLIPBOARD)
    GoTo SetTextGlobalFree
    End If

    ' Remove the current contents of the clipboard
    If Not CBool(EmptyClipboard()) Then
    varRet = CVErr(CANNOTEMPTYCLIPBOARD)
    GoTo SetTextCloseClipboard
    End If

    ' Add our string to the clipboard as text
    If Not CBool(SetClipboardData(CF_TEXT, _
    hMemory)) Then
    varRet = CVErr(CANNOTSETCLIPBOARDDATA)
    GoTo SetTextCloseClipboard
    Else
    fSetClipboardData = True
    End If

    SetTextCloseClipboard:
    ' Close the clipboard
    If Not CBool(CloseClipboard()) Then
    varRet = CVErr(CANNOTCLOSECLIPBOARD)
    End If

    SetTextGlobalFree:
    If Not fSetClipboardData Then
    'If we have set the clipboard data, we no longer own
    ' the object--Windows does, so don't free it.
    If CBool(GlobalFree(hMemory)) Then
    varRet = CVErr(CANNOTGLOBALFREE)
    End If
    End If

    SetTextDone:
    SetText = varRet
    End Function

    Public Function GetText() As Variant
    Dim hMemory As Long
    Dim lpMemory As Long
    Dim strText As String
    Dim lngSize As Long
    Dim varRet As Variant

    varRet = ""

    ' Is there text on the clipboard? If not, error out.
    If Not CBool(IsClipboardFormatAvailable _
    (CF_TEXT)) Then
    varRet = CVErr(CLIPBOARDFORMATNOTAVAILABLE)
    GoTo GetTextDone
    End If

    ' Open the clipboard
    If Not CBool(OpenClipboard(0&)) Then
    varRet = CVErr(CANNOTOPENCLIPBOARD)
    GoTo GetTextDone
    End If

    ' Get the handle to the clipboard data
    hMemory = GetClipboardData(CF_TEXT)
    If Not CBool(hMemory) Then
    varRet = CVErr(CANNOTGETCLIPBOARDDATA)
    GoTo GetTextCloseClipboard
    End If

    ' Find out how big it is and allocate enough space
    ' in a string
    lngSize = GlobalSize(hMemory)
    strText = Space$(lngSize)

    ' Lock the handle so we can use it
    lpMemory = GlobalLock(hMemory)
    If Not CBool(lpMemory) Then
    varRet = CVErr(CANNOTGLOBALLOCK)
    GoTo GetTextCloseClipboard
    End If

    ' Move the information from the clipboard memory
    ' into our string
    Call MoveMemory(strText, lpMemory, lngSize)

    ' Truncate it at the first Null character because
    ' the value reported by lngSize is erroneously large
    strText = Left$(strText, InStr(1, strText, Chr$(0)) - 1)

    ' Free the lock
    Call GlobalUnlock(hMemory)

    GetTextCloseClipboard:
    ' Close the clipboard
    If Not CBool(CloseClipboard()) Then
    varRet = CVErr(CANNOTCLOSECLIPBOARD)
    End If

    GetTextDone:
    If Not IsError(varRet) Then
    GetText = strText
    Else
    GetText = varRet
    End If
    End Function

    The post was edited 1 time, last by vesi ().

  • Copy and Paste in Palo Excel Worksheet - part 2

    (in startup makro using)
    Application.OnKey "^m", "DataCopyFromCliboart"

    Sub DataCopyFromCliboart()
    Dim sParametr(18) As Variant
    Dim aData() As String
    Dim text As String
    Dim iLen As Integer
    Dim iString As Integer
    On Error Resume Next
    text = GetText
    iRow = 0
    iColumn = 0
    iLen = Len(text)
    For iString = 1 To iLen - 2
    sString = Mid(text, iString, 1)
    If iRow < 1 Then
    If sString = Chr(9) Then
    iColumn = iColumn + 1
    End If
    End If
    If sString = Chr(13) Then
    iRow = iRow + 1
    End If
    Next iString
    iRowClipboard = iRow
    iColumnClipboard = iColumn
    ReDim aData(iRow, iColumn)
    iColumn = 0
    iRow = 0
    For iString = 1 To iLen - 1
    sString = Mid(text, iString, 1)
    If IsNumeric(sString) Or sString = "," Or sString = "." Then
    sStringValue = sStringValue + sString
    Else
    If sString <> Chr(9) And sString <> Chr(10) And sString <> Chr(13) Then
    MsgBox Sett.LangSheet.Cells(227, Sett.iColumnLanguage).text, vbExclamation, Sett.LangSheet.Cells(402, Sett.iColumnLanguage).text
    Exit Sub
    End If
    dValue = CDbl(sStringValue)
    aData(iRow, iColumn) = dValue
    sStringValue = ""
    End If
    If sString = Chr(9) Then
    iColumn = iColumn + 1
    End If
    If sString = Chr(13) Then
    iRow = iRow + 1
    iString = iString + 1
    iColumn = 0
    End If
    Next iString
    iRow = 0
    iColumn = 0
    iRowSelected = Selection.Rows.Count
    iColumnSelected = Selection.Columns.Count
    iSelectedRow = ActiveCell.Row
    iSelectedColumn = ActiveCell.Column
    If iRowClipboard = 0 And iColumnClipboard = 0 And Selection.Count > 1 Then
    For iRow = 0 To iRowSelected - 1
    For iColumn = 0 To iColumnSelected - 1
    sFormula = Cells(iSelectedRow + iRow, iSelectedColumn + iColumn).Formula
    If Left(sFormula, 10) <> "=PALO.DATA" Or ActiveCell.Interior.Color <> 16777215 Then
    MsgBox Sett.LangSheet.Cells(228, Sett.iColumnLanguage).text, vbExclamation, Sett.LangSheet.Cells(402, Sett.iColumnLanguage).text
    Exit Sub
    End If
    Next iColumn
    Next iRow
    For iRow = 0 To iRowSelected - 1
    For iColumn = 0 To iColumnSelected - 1
    sFormula = Cells(iSelectedRow + iRow, iSelectedColumn + iColumn).Formula
    dValue = aData(iRow, iColumn)
    sValue = Replace(dValue, ",", ".")
    If Left(sFormula, 10) = "=PALO.DATA" And Cells(iSelectedRow + iRow, iSelectedColumn + iColumn).Interior.Color = 16777215 Then
    iDimensionCount = iCountParametersOfFunction(sFormula)
    For iDimension = 1 To iDimensionCount
    sParametr(iDimension) = sGetParameterOfFunction(sFormula, iDimension, False)
    Next iDimension
    dValue = Palo.SetData(sValue, True, sParametr(1), sParametr(2), sParametr(3), sParametr(4), sParametr(5), sParametr(6), sParametr(7), sParametr(8), sParametr(9), sParametr(10), sParametr(11), sParametr(12), sParametr(13), sParametr(14), sParametr(15), sParametr(16), sParametr(17), sParametr(18), iDimensionCount - 2)
    End If
    Next iColumn
    Next iRow
    ActiveSheet.Calculate
    On Error GoTo 0
    Exit Sub
    End If
    If (iRowClipboard > 0 Or iColumnClipboard > 0) And Selection.Count = 1 Then
    For iRow = 0 To iRowClipboard
    For iColumn = 0 To iColumnClipboard
    sFormula = Cells(iSelectedRow + iRow, iSelectedColumn + iColumn).Formula
    If Left(sFormula, 10) <> "=PALO.DATA" Or Cells(iSelectedRow + iRow, iSelectedColumn + iColumn).Interior.Color <> 16777215 Then
    MsgBox Sett.LangSheet.Cells(228, Sett.iColumnLanguage).text, vbExclamation, Sett.LangSheet.Cells(402, Sett.iColumnLanguage).text
    Exit Sub
    End If
    Next iColumn
    Next iRow
    For iRow = 0 To iRowClipboard
    For iColumn = 0 To iColumnClipboard
    sFormula = Cells(iSelectedRow + iRow, iSelectedColumn + iColumn).Formula
    dValue = aData(iRow, iColumn)
    sValue = Replace(dValue, ",", ".")
    If Left(sFormula, 10) = "=PALO.DATA" And ActiveCell.Interior.Color = 16777215 Then
    iDimensionCount = iCountParametersOfFunction(sFormula)
    For iDimension = 1 To iDimensionCount
    sParametr(iDimension) = sGetParameterOfFunction(sFormula, iDimension, False)
    Next iDimension
    dValue = Palo.SetData(sValue, True, sParametr(1), sParametr(2), sParametr(3), sParametr(4), sParametr(5), sParametr(6), sParametr(7), sParametr(8), sParametr(9), sParametr(10), sParametr(11), sParametr(12), sParametr(13), sParametr(14), sParametr(15), sParametr(16), sParametr(17), sParametr(18), iDimensionCount - 2)
    End If
    Next iColumn
    Next iRow
    ActiveSheet.Calculate
    Exit Sub
    End If
    If iRowClipboard = iRowSelected - 1 And iColumnClipboard = iColumnSelected - 1 Then
    For iRow = 0 To iRowClipboard
    For iColumn = 0 To iColumnClipboard
    sFormula = Cells(iSelectedRow + iRow, iSelectedColumn + iColumn).Formula
    If Left(sFormula, 10) <> "=PALO.DATA" Or Cells(iSelectedRow + iRow, iSelectedColumn + iColumn).Interior.Color <> 16777215 Then
    MsgBox Sett.LangSheet.Cells(228, Sett.iColumnLanguage).text, vbExclamation, Sett.LangSheet.Cells(402, Sett.iColumnLanguage).text
    Exit Sub
    End If
    Next iColumn
    Next iRow
    For iRow = 0 To iRowClipboard
    For iColumn = 0 To iColumnClipboard
    sFormula = Cells(iSelectedRow + iRow, iSelectedColumn + iColumn).Formula
    dValue = aData(iRow, iColumn)
    sValue = Replace(dValue, ",", ".")
    If Left(sFormula, 10) = "=PALO.DATA" And ActiveCell.Interior.Color = 16777215 Then
    iDimensionCount = iCountParametersOfFunction(sFormula)
    For iDimension = 1 To iDimensionCount
    sParametr(iDimension) = sGetParameterOfFunction(sFormula, iDimension, False)
    Next iDimension
    dValue = Palo.SetData(sValue, True, sParametr(1), sParametr(2), sParametr(3), sParametr(4), sParametr(5), sParametr(6), sParametr(7), sParametr(8), sParametr(9), sParametr(10), sParametr(11), sParametr(12), sParametr(13), sParametr(14), sParametr(15), sParametr(16), sParametr(17), sParametr(18), iDimensionCount - 2)
    End If
    Next iColumn
    Next iRow
    ActiveSheet.Calculate
    On Error GoTo 0
    Exit Sub
    End If
    If iColumnClipboard = 0 And iColumnSelected > 1 Then
    For iRow = 0 To iRowClipboard
    For iColumn = 0 To iColumnSelected - 1
    sFormula = Cells(iSelectedRow + iRow, iSelectedColumn + iColumn).Formula
    If Left(sFormula, 10) <> "=PALO.DATA" Or Cells(iSelectedRow + iRow, iSelectedColumn + iColumn).Interior.Color <> 16777215 Then
    MsgBox Sett.LangSheet.Cells(228, Sett.iColumnLanguage).text, vbExclamation, Sett.LangSheet.Cells(402, Sett.iColumnLanguage).text
    Exit Sub
    End If
    Next iColumn
    Next iRow
    For iRow = 0 To iRowClipboard
    For iColumn = 0 To iColumnSelected - 1
    sFormula = Cells(iSelectedRow + iRow, iSelectedColumn + iColumn).Formula
    dValue = aData(iRow, iColumn)
    sValue = Replace(dValue, ",", ".")
    If Left(sFormula, 10) = "=PALO.DATA" And ActiveCell.Interior.Color = 16777215 Then
    iDimensionCount = iCountParametersOfFunction(sFormula)
    For iDimension = 1 To iDimensionCount
    sParametr(iDimension) = sGetParameterOfFunction(sFormula, iDimension, False)
    Next iDimension
    dValue = Palo.SetData(sValue, True, sParametr(1), sParametr(2), sParametr(3), sParametr(4), sParametr(5), sParametr(6), sParametr(7), sParametr(8), sParametr(9), sParametr(10), sParametr(11), sParametr(12), sParametr(13), sParametr(14), sParametr(15), sParametr(16), sParametr(17), sParametr(18), iDimensionCount - 2)
    End If
    Next iColumn
    Next iRow
    ActiveSheet.Calculate
    Exit Sub
    End If
    If iRowClipboard = 0 And iRowSelected > 1 Then
    For iColumn = 0 To iColumnClipboard
    For iRow = 0 To iRowSelected - 1
    sFormula = Cells(iSelectedRow + iRow, iSelectedColumn + iColumn).Formula
    If Left(sFormula, 10) <> "=PALO.DATA" Or Cells(iSelectedRow + iRow, iSelectedColumn + iColumn).Interior.Color <> 16777215 Then
    MsgBox Sett.LangSheet.Cells(228, Sett.iColumnLanguage).text, vbExclamation, Sett.LangSheet.Cells(402, Sett.iColumnLanguage).text
    Exit Sub
    End If
    Next iRow
    Next iColumn
    For iColumn = 0 To iColumnClipboard
    For iRow = 0 To iRowSelected - 1
    sFormula = Cells(iSelectedRow + iRow, iSelectedColumn + iColumn).Formula
    dValue = aData(iRow, iColumn)
    sValue = Replace(dValue, ",", ".")
    If Left(sFormula, 10) = "=PALO.DATA" And ActiveCell.Interior.Color = 16777215 Then
    iDimensionCount = iCountParametersOfFunction(sFormula)
    For iDimension = 1 To iDimensionCount
    sParametr(iDimension) = sGetParameterOfFunction(sFormula, iDimension, False)
    Next iDimension
    dValue = Palo.SetData(sValue, True, sParametr(1), sParametr(2), sParametr(3), sParametr(4), sParametr(5), sParametr(6), sParametr(7), sParametr(8), sParametr(9), sParametr(10), sParametr(11), sParametr(12), sParametr(13), sParametr(14), sParametr(15), sParametr(16), sParametr(17), sParametr(18), iDimensionCount - 2)
    End If
    Next iRow
    Next iColumn
    ActiveSheet.Calculate
    On Error GoTo 0
    Exit Sub
    End If
    On Error GoTo 0
    End Sub

    The post was edited 1 time, last by vesi ().