Additional Controls vba for Excel "problem"
Additional Controls vba for Excel "problem" Failure to appear when you press its button. I am using Office 2013 and Windows OS 8 (32bit).
Note
should
focus on, I
use Office
2013
- the
system
Windows 8
(32-bit).
Please help me, and accept a multitude of thanks and respect..
Hi ghass
Your question is not belong to the current Windows Store App dev forum.
To help you move the thread to the correct forum, I would ask you some questions: Is your issue a build-in ActiveX control issue?
I will move your thread to either OfficeDev forum or Office consumer forum.
Thanks for your understanding.
--James
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Similar Messages
-
Sending and receivind ADC coefficients from/to soundcard in VBA for Excel 2010
How to send and receive ADC coefficients from/to soundcard(mixer,microphone) in VBA for Excel 2010 (noncom. edition, x64) to Excel macros for DFT (from IDFT), IIR , user defined samples parser (special
noise generator, graphic s(t),S(jw), arg s(jw) soundcard AFR test ) ?
What .dll is need for this (without bass.dll)?Example from internet :
'This project needs a module and a form
'The form must contain two labels, two progressbars, a timer and a checkbox
'Paste this code into the form
Dim hmixer As Long ' mixer handle
Dim inputVolCtrl As MIXERCONTROL ' waveout volume control
Dim outputVolCtrl As MIXERCONTROL ' microphone volume control
Dim rc As Long ' return code
Dim ok As Boolean ' boolean return code
Dim mxcd As MIXERCONTROLDETAILS ' control info
Dim vol As MIXERCONTROLDETAILS_SIGNED ' control's signed value
Dim volume As Long ' volume value
Dim volHmem As Long ' handle to volume memory
Private Sub Form_Load()
Me.ScaleMode = vbTwips
Me.Caption = "Volume meter"
Label1.Move 0, 0
Label1.AutoSize = True
Label1.Caption = "Input level"
Label2.Move 0, 4 * Label1.Height
Label2.AutoSize = True
Label2.Caption = "Output level"
ProgressBar1.Move Label1.Width * 2, 0, 3375
ProgressBar2.Move Label1.Width * 2, Label2.Top, 3375
Check1.Move ProgressBar1.Left, ProgressBar1.Height
Check1.Caption = "Get Input"
Me.Move Me.Left, Me.Top, ProgressBar1.Width + ProgressBar1.Left + 10 * Screen.TwipsPerPixelX, ProgressBar2.Top + ProgressBar2.Height + 30 * Screen.TwipsPerPixelY
Timer1.Interval = 50
Timer1.Enabled = True
' Open the mixer specified by DEVICEID
rc = mixerOpen(hmixer, DEVICEID, 0, 0, 0)
If ((MMSYSERR_NOERROR <> rc)) Then
MsgBox "Couldn't open the mixer."
Exit Sub
End If
' Get the input volume meter
ok = GetControl(hmixer, MIXERLINE_COMPONENTTYPE_DST_WAVEIN, MIXERCONTROL_CONTROLTYPE_PEAKMETER, inputVolCtrl)
If (ok <> True) Then
ok = GetControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE, MIXERCONTROL_CONTROLTYPE_PEAKMETER, inputVolCtrl)
End If
If (ok = True) Then
ProgressBar1.Min = 0
ProgressBar1.Max = inputVolCtrl.lMaximum
Else
ProgressBar1.Enabled = False
MsgBox "Couldn't get wavein meter"
End If
' Get the output volume meter
ok = GetControl(hmixer, MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT, MIXERCONTROL_CONTROLTYPE_PEAKMETER, outputVolCtrl)
If (ok = True) Then
ProgressBar2.Min = 0
ProgressBar2.Max = outputVolCtrl.lMaximum
Else
ProgressBar2.Enabled = False
MsgBox "Couldn't get waveout meter"
End If
' Initialize mixercontrol structure
mxcd.cbStruct = Len(mxcd)
volHmem = GlobalAlloc(&H0, Len(volume)) ' Allocate a buffer for the volume value
mxcd.paDetails = GlobalLock(volHmem)
mxcd.cbDetails = Len(volume)
mxcd.cChannels = 1
End Sub
Private Sub Check1_Click()
If (Check1.Value = 1) Then
StartInput ' Start receiving audio input
Else
StopInput ' Stop receiving audio input
End If
End Sub
Private Sub Timer1_Timer()
On Error Resume Next
' Process sound buffer if recording
If (fRecording) Then
For i = 0 To (NUM_BUFFERS - 1)
If inHdr(i).dwFlags And WHDR_DONE Then
rc = waveInAddBuffer(hWaveIn, inHdr(i), Len(inHdr(i)))
End If
Next
End If
' Get the current input level
If (ProgressBar1.Enabled = True) Then
mxcd.dwControlID = inputVolCtrl.dwControlID
mxcd.item = inputVolCtrl.cMultipleItems
rc = mixerGetControlDetails(hmixer, mxcd, MIXER_GETCONTROLDETAILSF_VALUE)
CopyStructFromPtr volume, mxcd.paDetails, Len(volume)
If (volume < 0) Then
volume = -volume
End If
ProgressBar1.Value = volume
End If
' Get the current output level
If (ProgressBar2.Enabled = True) Then
mxcd.dwControlID = outputVolCtrl.dwControlID
mxcd.item = outputVolCtrl.cMultipleItems
rc = mixerGetControlDetails(hmixer, mxcd, MIXER_GETCONTROLDETAILSF_VALUE)
CopyStructFromPtr volume, mxcd.paDetails, Len(volume)
If (volume < 0) Then volume = -volume
ProgressBar2.Value = volume
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
If (fRecording = True) Then
StopInput
End If
GlobalFree volHmem
End Sub
'Paste this code into the module
Public Const CALLBACK_FUNCTION = &H30000
Public Const MM_WIM_DATA = &H3C0
Public Const WHDR_DONE = &H1 ' done bit
Public Const GMEM_FIXED = &H0 ' Global Memory Flag used by GlobalAlloc functin
Type WAVEHDR
lpData As Long
dwBufferLength As Long
dwBytesRecorded As Long
dwUser As Long
dwFlags As Long
dwLoops As Long
lpNext As Long
Reserved As Long
End Type
Type WAVEINCAPS
wMid As Integer
wPid As Integer
vDriverVersion As Long
szPname As String * 32
dwFormats As Long
wChannels As Integer
End Type
Type WAVEFORMAT
wFormatTag As Integer
nChannels As Integer
nSamplesPerSec As Long
nAvgBytesPerSec As Long
nBlockAlign As Integer
wBitsPerSample As Integer
cbSize As Integer
End Type
Declare Function waveInOpen Lib "winmm.dll" (lphWaveIn As Long, ByVal uDeviceID As Long, lpFormat As WAVEFORMAT, ByVal dwCallback As Long, ByVal dwInstance As Long, ByVal dwFlags As Long) As Long
Declare Function waveInPrepareHeader Lib "winmm.dll" (ByVal hWaveIn As Long, lpWaveInHdr As WAVEHDR, ByVal uSize As Long) As Long
Declare Function waveInReset Lib "winmm.dll" (ByVal hWaveIn As Long) As Long
Declare Function waveInStart Lib "winmm.dll" (ByVal hWaveIn As Long) As Long
Declare Function waveInStop Lib "winmm.dll" (ByVal hWaveIn As Long) As Long
Declare Function waveInUnprepareHeader Lib "winmm.dll" (ByVal hWaveIn As Long, lpWaveInHdr As WAVEHDR, ByVal uSize As Long) As Long
Declare Function waveInClose Lib "winmm.dll" (ByVal hWaveIn As Long) As Long
Declare Function waveInGetDevCaps Lib "winmm.dll" Alias "waveInGetDevCapsA" (ByVal uDeviceID As Long, lpCaps As WAVEINCAPS, ByVal uSize As Long) As Long
Declare Function waveInGetNumDevs Lib "winmm.dll" () As Long
Declare Function waveInGetErrorText Lib "winmm.dll" Alias "waveInGetErrorTextA" (ByVal err As Long, ByVal lpText As String, ByVal uSize As Long) As Long
Declare Function waveInAddBuffer Lib "winmm.dll" (ByVal hWaveIn As Long, lpWaveInHdr As WAVEHDR, ByVal uSize As Long) As Long
Public Const MMSYSERR_NOERROR = 0
Public Const MAXPNAMELEN = 32
Public Const MIXER_LONG_NAME_CHARS = 64
Public Const MIXER_SHORT_NAME_CHARS = 16
Public Const MIXER_GETLINEINFOF_COMPONENTTYPE = &H3&
Public Const MIXER_GETCONTROLDETAILSF_VALUE = &H0&
Public Const MIXER_GETLINECONTROLSF_ONEBYTYPE = &H2&
Public Const MIXERLINE_COMPONENTTYPE_DST_FIRST = &H0&
Public Const MIXERLINE_COMPONENTTYPE_SRC_FIRST = &H1000&
Public Const MIXERLINE_COMPONENTTYPE_DST_SPEAKERS = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 4)
Public Const MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 3)
Public Const MIXERLINE_COMPONENTTYPE_SRC_LINE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 2)
Public Const MIXERCONTROL_CT_CLASS_FADER = &H50000000
Public Const MIXERCONTROL_CT_UNITS_UNSIGNED = &H30000
Public Const MIXERCONTROL_CT_UNITS_SIGNED = &H20000
Public Const MIXERCONTROL_CT_CLASS_METER = &H10000000
Public Const MIXERCONTROL_CT_SC_METER_POLLED = &H0&
Public Const MIXERCONTROL_CONTROLTYPE_FADER = (MIXERCONTROL_CT_CLASS_FADER Or MIXERCONTROL_CT_UNITS_UNSIGNED)
Public Const MIXERCONTROL_CONTROLTYPE_VOLUME = (MIXERCONTROL_CONTROLTYPE_FADER + 1)
Public Const MIXERLINE_COMPONENTTYPE_DST_WAVEIN = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 7)
Public Const MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 8)
Public Const MIXERCONTROL_CONTROLTYPE_SIGNEDMETER = (MIXERCONTROL_CT_CLASS_METER Or MIXERCONTROL_CT_SC_METER_POLLED Or MIXERCONTROL_CT_UNITS_SIGNED)
Public Const MIXERCONTROL_CONTROLTYPE_PEAKMETER = (MIXERCONTROL_CONTROLTYPE_SIGNEDMETER + 1)
Declare Function mixerClose Lib "winmm.dll" (ByVal hmx As Long) As Long
Declare Function mixerGetControlDetails Lib "winmm.dll" Alias "mixerGetControlDetailsA" (ByVal hmxobj As Long, pmxcd As MIXERCONTROLDETAILS, ByVal fdwDetails As Long) As Long
Declare Function mixerGetDevCaps Lib "winmm.dll" Alias "mixerGetDevCapsA" (ByVal uMxId As Long, ByVal pmxcaps As MIXERCAPS, ByVal cbmxcaps As Long) As Long
Declare Function mixerGetID Lib "winmm.dll" (ByVal hmxobj As Long, pumxID As Long, ByVal fdwId As Long) As Long
Declare Function mixerGetLineInfo Lib "winmm.dll" Alias "mixerGetLineInfoA" (ByVal hmxobj As Long, pmxl As MIXERLINE, ByVal fdwInfo As Long) As Long
Declare Function mixerGetLineControls Lib "winmm.dll" Alias "mixerGetLineControlsA" (ByVal hmxobj As Long, pmxlc As MIXERLINECONTROLS, ByVal fdwControls As Long) As Long
Declare Function mixerGetNumDevs Lib "winmm.dll" () As Long
Declare Function mixerMessage Lib "winmm.dll" (ByVal hmx As Long, ByVal uMsg As Long, ByVal dwParam1 As Long, ByVal dwParam2 As Long) As Long
Declare Function mixerOpen Lib "winmm.dll" (phmx As Long, ByVal uMxId As Long, ByVal dwCallback As Long, ByVal dwInstance As Long, ByVal fdwOpen As Long) As Long
Declare Function mixerSetControlDetails Lib "winmm.dll" (ByVal hmxobj As Long, pmxcd As MIXERCONTROLDETAILS, ByVal fdwDetails As Long) As Long
Declare Sub CopyStructFromPtr Lib "kernel32" Alias "RtlMoveMemory" (struct As Any, ByVal ptr As Long, ByVal cb As Long)
Declare Sub CopyPtrFromStruct Lib "kernel32" Alias "RtlMoveMemory" (ByVal ptr As Long, struct As Any, ByVal cb As Long)
Declare Function GlobalAlloc Lib "kernel32" (ByVal wFlags As Long, ByVal dwBytes As Long) As Long
Declare Function GlobalLock Lib "kernel32" (ByVal hmem As Long) As Long
Declare Function GlobalFree Lib "kernel32" (ByVal hmem As Long) As Long
Type MIXERCAPS
wMid As Integer
wPid As Integer
vDriverVersion As Long
szPname As String * MAXPNAMELEN
fdwSupport As Long
cDestinations As Long
End Type
Type MIXERCONTROL
cbStruct As Long
dwControlID As Long
dwControlType As Long
fdwControl As Long
cMultipleItems As Long
szShortName As String * MIXER_SHORT_NAME_CHARS
szName As String * MIXER_LONG_NAME_CHARS
lMinimum As Long
lMaximum As Long
Reserved(10) As Long
End Type
Type MIXERCONTROLDETAILS
cbStruct As Long
dwControlID As Long
cChannels As Long
item As Long
cbDetails As Long
paDetails As Long
End Type
Type MIXERCONTROLDETAILS_SIGNED
lValue As Long
End Type
Type MIXERLINE
cbStruct As Long
dwDestination As Long
dwSource As Long
dwLineID As Long
fdwLine As Long
dwUser As Long
dwComponentType As Long
cChannels As Long
cConnections As Long
cControls As Long
szShortName As String * MIXER_SHORT_NAME_CHARS
szName As String * MIXER_LONG_NAME_CHARS
dwType As Long
dwDeviceID As Long
wMid As Integer
wPid As Integer
vDriverVersion As Long
szPname As String * MAXPNAMELEN
End Type
Type MIXERLINECONTROLS
cbStruct As Long
dwLineID As Long
dwControl As Long
cControls As Long
cbmxctrl As Long
pamxctrl As Long
End Type
Public i As Integer, j As Integer, rc As Long, msg As String * 200, hWaveIn As Long
Public Const NUM_BUFFERS = 2
Public format As WAVEFORMAT, hmem(NUM_BUFFERS) As Long, inHdr(NUM_BUFFERS) As WAVEHDR
Public Const BUFFER_SIZE = 8192
Public Const DEVICEID = 0
Public fRecording As Boolean
Function GetControl(ByVal hmixer As Long, ByVal componentType As Long, ByVal ctrlType As Long, ByRef mxc As MIXERCONTROL) As Boolean
' This function attempts to obtain a mixer control. Returns True if successful.
Dim mxlc As MIXERLINECONTROLS
Dim mxl As MIXERLINE
Dim hmem As Long
Dim rc As Long
mxl.cbStruct = Len(mxl)
mxl.dwComponentType = componentType
' Obtain a line corresponding to the component type
rc = mixerGetLineInfo(hmixer, mxl, MIXER_GETLINEINFOF_COMPONENTTYPE)
If (MMSYSERR_NOERROR = rc) Then
mxlc.cbStruct = Len(mxlc)
mxlc.dwLineID = mxl.dwLineID
mxlc.dwControl = ctrlType
mxlc.cControls = 1
mxlc.cbmxctrl = Len(mxc)
' Allocate a buffer for the control
'hmem = GlobalAlloc(&H40, Len(mxc))
hmem = GlobalAlloc(GMEM_FIXED, Len(mxc))
mxlc.pamxctrl = GlobalLock(hmem)
mxc.cbStruct = Len(mxc)
' Get the control
rc = mixerGetLineControls(hmixer, mxlc, MIXER_GETLINECONTROLSF_ONEBYTYPE)
If (MMSYSERR_NOERROR = rc) Then
GetControl = True
' Copy the control into the destination structure
CopyStructFromPtr mxc, mxlc.pamxctrl, Len(mxc)
Else
GetControl = False
End If
GlobalFree (hmem)
Exit Function
End If
GetControl = False
End Function
' Function to process the wave recording notifications.
Sub waveInProc(ByVal hwi As Long, ByVal uMsg As Long, ByVal dwInstance As Long, ByRef hdr As WAVEHDR, ByVal dwParam2 As Long)
If (uMsg = MM_WIM_DATA) Then
If fRecording Then
rc = waveInAddBuffer(hwi, hdr, Len(hdr))
End If
End If
End Sub
' This function starts recording from the soundcard. The soundcard must be recording in order to
' monitor the input level. Without starting the recording from this application, input level
' can still be monitored if another application is recording audio
Function StartInput() As Boolean
If fRecording Then
StartInput = True
Exit Function
End If
format.wFormatTag = 1
format.nChannels = 1
format.wBitsPerSample = 8
format.nSamplesPerSec = 8000
format.nBlockAlign = format.nChannels * format.wBitsPerSample / 8
format.nAvgBytesPerSec = format.nSamplesPerSec * format.nBlockAlign
format.cbSize = 0
For i = 0 To NUM_BUFFERS - 1
hmem(i) = GlobalAlloc(&H40, BUFFER_SIZE)
inHdr(i).lpData = GlobalLock(hmem(i))
inHdr(i).dwBufferLength = BUFFER_SIZE
inHdr(i).dwFlags = 0
inHdr(i).dwLoops = 0
Next
rc = waveInOpen(hWaveIn, DEVICEID, format, 0, 0, 0)
If rc <> 0 Then
waveInGetErrorText rc, msg, Len(msg)
MsgBox msg
StartInput = False
Exit Function
End If
For i = 0 To NUM_BUFFERS - 1
rc = waveInPrepareHeader(hWaveIn, inHdr(i), Len(inHdr(i)))
If (rc <> 0) Then
waveInGetErrorText rc, msg, Len(msg)
MsgBox msg
End If
Next
For i = 0 To NUM_BUFFERS - 1
rc = waveInAddBuffer(hWaveIn, inHdr(i), Len(inHdr(i)))
If (rc <> 0) Then
waveInGetErrorText rc, msg, Len(msg)
MsgBox msg
End If
Next
fRecording = True
rc = waveInStart(hWaveIn)
StartInput = True
End Function
' Stop receiving audio input on the soundcard
Sub StopInput()
fRecording = False
waveInReset hWaveIn
waveInStop hWaveIn
For i = 0 To NUM_BUFFERS - 1
waveInUnprepareHeader hWaveIn, inHdr(i), Len(inHdr(i))
GlobalFree hmem(i)
Next
waveInClose hWaveIn
End Sub
Error if using winmm.dll, kernel32 in x64 mode -
Hi,
I'm trying to control a NI6128 via VBA. I'm using Excel 2003 and tried several of the samples I found in the developer Zone, none of them seem to run. I think there is a fundamental error somewhere.
But, the VB6 drivers suppose to run under VBA and that is suppose to work under Excel 2003?
PeterCheck out some of these links about programming in VBA. You might have to make some of your own code, I haven't been able to get those examples to run either.
http://digital.ni.com/public.nsf/allkb/B22FE2B0F9C8935286256E920073DA07?OpenDocument
http://digital.ni.com/public.nsf/allkb/735848148B5B4964862571F5004692C7?OpenDocument
http://digital.ni.com/public.nsf/websearch/B22FE2B0F9C8935286256E920073DA07?OpenDocument
I hope that this helps.
Applications Engineer
National Instruments -
Problem with controlling Annotations from Excel VBA
Hi,
I have a PDF document that has plenty of sticky notes attached to it. These sticky notes have been added by multiple authors on all pages of the document. I am trying to import the contents of these sticky notes, their author and the page number to an excel spreadsheet. I am using Excel 2007 and Acrobat Professional 9.0.
This is the code that I am currently using to import the sticky notes, but the problem that I am facing is that when I run the macro -
Same sticky note contents, author and page numbers are imported multiple times
Not all sticky notes are imported, only some of them appear in the final excel spreadsheet
When I compare the number of sticky notes to that in the original PDF file, the number is correct. But the content is repeated content and that is the reason why only some of the sticky notes are imported.
This is an activity that I need to do on regular basis and the number of sticky notes that I need to import to excel may range between 100 to 200. It is really difficult to do this task manually, so an excel VBA macro could prove really helpful.
Sub ImportComments_Click()
Dim Fpath As String
Dim WordObj As Object
Dim wbkOutput As Excel.Workbook
Dim iRow As Integer
Dim i, j, k As Integer
Dim lRet As Long
Dim objAcroAVDoc As New Acrobat.acroAVDoc
Dim objAcroPDDoc As Acrobat.AcroPDDoc
Dim numPages As Long
Dim lAnnotscnt As Long
Dim Subtype As String
Dim NumComments As Long
Dim AcroApp As Acrobat.AcroApp
Dim objAcroPDPage As Acrobat.AcroPDPage
Dim annot As Acrobat.AcroPDAnnot
Sheets("Defect Log").Select
Range("L3").Activate
Fpath = ActiveCell.Value
Sheets("Defect Log").Select
Range("A1").Activate
i = 0
Do While (Not (IsEmpty(ActiveCell.Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 1).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 2).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 3).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 4).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 5).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 6).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 7).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 8).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 9).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 10).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 11).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 12).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 13).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 14).Value)))
i = i + 1
ActiveCell.Offset(1, 0).Select
Loop
iRow = i + 1
Set wbkOutput = ActiveWorkbook
lRet = objAcroAVDoc.Open(Fpath, "")
Set objAcroPDDoc = objAcroAVDoc.GetPDDoc
numPages = objAcroPDDoc.GetNumPages()
Set objAcroPDPage = objAcroPDDoc.AcquirePage(0)
For k = 1 To numPages
lAnnotscnt = objAcroPDPage.GetNumAnnots()
For m = 0 To lAnnotscnt - 1
If lAnnotscnt = 0 Then Exit For
Set objAcroPDAnnot = objAcroPDPage.GetAnnot(m)
If (objAcroPDAnnot.GetContents <> "" And objAcroPDAnnot.GetSubtype = "Text") Then
Cells(iRow, 5).Value = k
Cells(iRow, 2).Value = objAcroPDAnnot.GetContents()
Cells(iRow, 11).Value = objAcroPDAnnot.GetTitle()
iRow = iRow + 1
End If
Next m
Set objAcroPDPage = objAcroPDDoc.AcquirePage(k)
Next k
lRet = objAcroAVDoc.Close(1)
Set objAcroAVDoc = Nothing
Set objAcroPDAnnot = Nothing
Set objAcroPDPage = Nothing
Set objAcroPDDoc = Nothing
End SubMake sure you are current with 9.x patches, just on general principles.
The code seems fine – nothing jumping out at me.
You can also look at using the JSObject methods and trying this via the JavaScript stuff – that will give you more access to the Annotation information…
From: Adobe Forums <[email protected]<mailto:[email protected]>>
Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
Date: Thu, 24 Nov 2011 04:25:12 -0800
To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
Subject: Problem with controlling Annotations from Excel VBA
Problem with controlling Annotations from Excel VBA
created by apreeti<http://forums.adobe.com/people/apreeti> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/4044740#4044740 -
Excel o/p in Reports 9i-additional report header for every row
Dear All,
Is there any way to generate an Excel file output from OracleReports9i.Actually I have tried the simple report.
I am able to create a delimited output.But the prob is it contains an additional report header for every row of the report and this is very strange.Its coming like that
Empno Ename Job 7566 JONES MANAGER
Empno Ename Job 7902 FORD ANALYST
I need the Xls o/p like that
Empno Ename Job
7566 JONES MANAGER
7902 FORD ANALYST
8877 JAMES SALES
my Environment oracle9i developersuite /forms9i/reports9i
I have given DESFORMAT = DELIMITED
MODE = CHARACTER
I am able to generate the reports in html/HTMLCSSIE/HTMLCSS/PDF/RTF
Only delimited is giving problem
What should i do to resolve this issue. Please help me it is very very urgent for me.
Thanks in advance
Pavendhan.NI had the same problem and this is what I did, works great. You have the total control.
function BeforeReport return boolean is
fp text_io.file_type;
begin
-- creating a file name
:CP_filename := 'C:\Gap'||to_char(sysdate,'MMDDYYHHMISS')||'.csv';
-- Opening the file in write mode
fp := text_io.fopen(:CP_filename,'w');
-- writing the column headings into the file
text_io.put_line(fp,'"Platform","Sys#","GapType",');
text_io.fclose(fp);
return (TRUE);
end;
and then where ever it is suitable, depending on the requirement, write into file by opening it in the append mode.
function R_G_systemplatformFormatTrigge return boolean is
fp text_io.file_type;
begin
-- srw.message(99,:dname);
fp := text_io.fopen(:CP_filename,'a');
text_io.put(fp,'"' || :systemplatform || '",');
text_io.put(fp,'"' || to_char(:sysno) || '",');
text_io.put_line(fp,'"' || :CF_gaptype || '",');
text_io.fclose(fp);
return (TRUE);
end;
This works great. Hope this helps. -
Problem for Report Generation Toolkit for excel 2000
Hi all,
Now I am Developing my program with Report Generation Toolkit 1.1.0 and Labview 7.1.
In my computer I am using Excel XP, and there is not any problem. But when I build to
a exe file, and use in a computer with Excel 2000, it didn't work.
And I try to check the source file in this computer, I found that there any some connection
error. And this is caused by the active X class. As I know Excel 2000 is using Microsoft Excel
Object Library 9.0, but i cannot find it in the list of active x. So it is using Microsoft Excel Object
Library with a very old verison. So in the property node there are missing functions, such as the
UsedRange in _Worksheet in the Excel_Get_Range.vi. However, In VBA, I can find the 9.0 Library.
Is it the problem of 9.0 library? How can I solve the problem? How can I upgrade the library to 10.0?
Thanks.
Regard,
RyanHi Mike,
Since my program is for all the staff in office, everyone may use it.
I cannot call the whole office to upgrade the excel to XP.
And I think Report Generation Toolkit is alway support Excel 2000,
since the old version of it is not support for Excel XP.
Regard,
Ryan -
Error in running a function to convert coordinates in degrees to decimal for EXCEL VBA
For your information, I have 3 cross-posts regarding this question - and all I can said there is still no firm solution regarding this error.
1) http://stackoverflow.com/questions/27634586/error-in-running-a-function-to-convert-coordinates-in-degrees-to-decimal-for-exc/27637367#27637367
2) http://www.mrexcel.com/forum/excel-questions/826099-error-running-function-convert-coordinates-degrees-decimal-excel-visual-basic-applications.html#post4030377
3) http://www.excelguru.ca/forums/showthread.php?3909-Error-in-running-a-function-to-convert-coordinates-in-degrees-to-decimal-for-EXCEL-VB&p=16507#post16507
and the story of the error is as below:
Currently I am working on VBA excel to create a widget to verify coordinates whether it lies under the radius of ANOTHER predefined and pre-specified sets of coordinates.
In the module, I want to convert the coordinates from degrees to decimal before doing the calculation - as the formula of the calculation only allow the decimal form of coordinates.
However, each and every time I want to run the macros this error (Run-time error '5', invalid procedure call or argument) will appear. Then, the debug button will bring me to below line of coding:
degrees = Val(Left(Degree_Deg, InStr(1, Degree_Deg, "°") - 1))
For your information, the full function is as below:
Function Convert_Decimal(Degree_Deg As String) As Double
'source: http://support.microsoft.com/kb/213449
Dim degrees As Double
Dim minutes As Double
Dim seconds As Double
Degree_Deg = Replace(Degree_Deg, "~", "°")
degrees = Val(Left(Degree_Deg, InStr(1, Degree_Deg, "°") - 1))
minutes = Val(Mid(Degree_Deg, InStr(1, Degree_Deg, "°") + 2, _
InStr(1, Degree_Deg, "'") - InStr(1, Degree_Deg, "°") - 2)) / 60
seconds = Val(Mid(Degree_Deg, InStr(1, Degree_Deg, "'") + _
2, Len(Degree_Deg) - InStr(1, Degree_Deg, "'") - 2)) / 3600
Convert_Decimal = degrees + minutes + seconds
End Function
Thank you.
Your kind assistance and attention in this matter are highly appreciated.
Regards,
Nina.You didn't give an example of your input string but try the following
Sub test()
Dim s As String
s = "180° 30' 30.5""""" ' double quote for seconds
Debug.Print Deg2Dec(s) ' 180.508472222222
End Sub
Function Deg2Dec(sAngle As String) As Double
Dim mid1 As Long
Dim mid2 As Long
Dim degrees As Long
Dim minutes As Long
Dim seconds As Double ' or Long if only integer seconds
sAngle = Replace(sAngle, " ", "")
mid1 = InStr(sAngle, "°")
mid2 = InStr(sAngle, "'")
degrees = CLng(Left$(sAngle, mid1 - 1))
minutes = CLng(Mid$(sAngle, mid1 + 1, mid2 - mid1 - 1))
seconds = Val(Mid$(sAngle, mid2 + 1, 10)) ' change 10 to 2 if only integer seconds
Deg2Dec = degrees + minutes / 60 + seconds / 3600
End Function
As written the function assumes values for each of deg/min/sec are included with unit indicators as given. Adapt for your needs.
In passing, for any work with trig functions you will probably need to convert the degrees to radians. -
Problem Launching BPC for Excel in Terminal Services/Citrix Environment
Hello.
We are having an issue launching BPC in our terminal services/citrix environment. This is not the main way that users will be accessing BPC, but we plan to have it available for off-hours/off-site use.
Here are details on our environment.
1) BPC version: 5.0.502 (5.1, SP3, patch 4)
2) Env: 1 web/app server, 1 database server
3) SQL Server 2005 Enterprise Edition, SP2
4) Problem occurs sporadically for any user.
In some instances, launching BPC for Excel does not bring up the connection wizard, instead, an error message displays saying "Object Variable is not set". We then logoff, delete the terminal services profile, and logon again, forcing the creation of a new terminal services profile, and BPC for Excel will launch the connection wizard as expected. So it seems that the terminal services profile sometimes gets corrupted. Does someone know which Windows registry key would cause this situation so we can determine the root problem? Deleting the profile is not a practical permanent solution. This is only an issue in terminal services/citrix, no other environment.
I opened this with support, but they said it's my problem. I'd appreciate any ideas to solve this. Thanks, NancyHello,
I have exactly the same problem too (Citrix / BPC 7.0M SP6 Client).
Do you have a solution regarding this issue ?
Thanks in advance. -
Problem with Obi for Excel and Agents - Obiee 11.1.1.6.6
Hello,
When I export query to Excel from a dashboard OBI, the file size is only *350 KB* but when I use agent for same query and send an email, the excel file size is *6 MB*, so there is a great diference in size and I have a problem because I have restriction for sending emails regarding to file size.
Do you Know why increase a lot file size when I use aaan gent ?
I have another question:
When I use pluggin obi for excel, I am lossing information content when I use pluggin obi for excel.
Do you know if I must to change configuration in instanceconfig.xml ? or is there another reason ?
Regards,
MBPThanks Benoit,
I changed the parameter jus like you suggested to me and it works very well, but I have another problem with agent and it is regarding to file size.
When I export query to Excel from a dashboard OBI, the file size is only *350 KB* but when I use agent for same query and send an email, the excel file size is *6 MB*, so there is a great differenrence in size and I have a problem because I have restriction for sending emails regarding to file size.
Do you Know why increase a lot file size when I use agent ?
I have another question:
When I use pluggin obi for excel, I have the same problem than I expused here at beggining with agent, I am lossing information content when I use pluggin obi for excel.
Do you know if I must to change configuration in instanceconfig.xml ? or is there another reason ?
Regards,
MBP -
Who is responsible for Excel 2008 display problems?
I have Office 2008 installed on MacBook Pro 15" with an Apple Cinema display attached. The display is set to non-mirrored mode. When I invoke Excel and move it to the larger display I cannot position it to the top of the Cinema display. It will not move higher than the level of top of the the power book display as shown in the System Preferences ->Displays control panel.
If I move the PB display position higher with respect to the Cinema display then Excel will also display higher on the Cinema display.
Who takes ownership of this? Apple or Microsoft?It sure sounds like an Excel problem. Office 2008 is really a 1.0 release by some new programmers. The core functionality works really well but it is a little rough around the edges.
I don't know of an official way to report bugs. There is a feedback link in the Help menu. I have heard of some people getting results from that. -
Problem with Office 2007 whenever I install the iCloud Control Panel for Windows
Sadly I have a Win7 laptop as my work hack and am using Office 2007. Outside of work I use iCloud to sync calenders between various iOS/OS X devices however whenever I install the iCloud Control Panel for Windows Plugin my email no longer loads. Outlook starts fine and just sits there with an empty inbox waiting for mail to load. I can't even open the iCloud Panel from within Control Panel either to set preferences!
Unistalling the iCloud plug-in resolves this but I really want to sync my iCloud calender with Outlook and can't see any other way to do it, plus it worked before and then just stopped.
Any assistance would be appreciated.I tired everything that was suggested in the forum. Tried IE and firefox to no avail. When I tried computers in stores both worked. A friend of mine who has the 32 bit setup got it to work. Several folks have stated it is the compatability issue with 64 bit. As a last resort, I loaded safari on my home computer, and yep, it works. Go figure, apple product.
-
Master Data Services Add-in for Excel Issue
I am trying to configure MDS in the Production server. I am running into isssues.
(I was able to do the whole process successfuly in my local system - Versions are same in the local and server - Only difference is local machine is windows 7 server is Windows 2008 R2)
I have installed SQL server 2012 Enterprise Version SP1. I am able to browse the MDS URL. User has got full permissions. When I try to access the MDS via Excel I get the below error.
Can any one help me please I have spent days on this withou any joy.
Error message
TITLE: Master Data Services Add-in for Excel
An error occurred while receiving the HTTP response to
http://MYIPADDRESS/mds/service/service.svc/bhb. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See
server logs for more details.
ADDITIONAL INFORMATION:
The underlying connection was closed: An unexpected error occurred on a receive. (System)
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. (System)
An existing connection was forcibly closed by the remote host (System)
BUTTONS:
OK
BnI have finally found a solution for this problem! Every time I opened Excel (unless I ran as administrator) I would have to activate the MDS add-in; this was time-consuming and annoying. It seems like there was no solution posted online anywhere! Well
after much aggravation, I have finally found a solution:
Fixing the Microsoft MDS Excel Add-In so it Stays Enabled
Press the Start button (Windows button)
In the search bar type “REGEDIT”
Open regedit.exe
A pop-up will ask permission for the Registry Editor to make changes to the computer, select Yes.
In the Registry Editor expand HKEY_CURRENT_USER
In the HKEY_CURRENT_USER folder, expand in the following order: Software -> Microsoft -> Office -> Excel -> Addins
Select Microsoft.MasterDataServices.ExcelAddIn
Double-click on LoadBehavior in the right panel
In the Edit Value popup, change the value to
Press OK
Exit the Registry Editor
The excel add-in should now be active anytime you open Excel. If multiple errors occur while using the add-in, the Load Behavior may change back to 0. If that occurs simply follow these steps so the add-in will be active when Excel starts up.
I hope this helps some of you avoid the long hours of trying to find a solution to this silly problem.
Cheers!
Tony -
Analyzer for Excel and Office 2007: Issue on Data Refresh and Parameters
Hi all,
for a customer BIP workshop I want to prepare a demo and experience a strange issue. Hope this is known and bugfix or workaround exists.
Created a very simple demo report with two columns and a numeric parameter. Called Excel Analyzer, the document opens correctly in Excel, data are filtered properly using the parameters initial value. I always have to log in to BI Publisher Server first, when a new instance of Excel is opened.
Then I choose 'Show parameters' from the BIP add-on menu. My parameter is shown with its correct inital value. But: After pressing 'Refresh Data' (regardless if parameter value has been changed or not), a VBA error message (Code 1004) occurs. Then the excel cursor remains hourglass and no BIP related function is available in this opened Excel instance anymore.
And another thing: After choosing 'Show Parameters' there appears a new empty column under 'Report Parameters' and the first cells of the table data are overwritten with parameter values.
Think, something goes wrong there with Excel 2007. Unfortunately I only can use this version.
Thanks in advance for hints. If I cannot fix this until Friday, customer will probably not be exalted by BIP :( .
Edited by: KaiMoeller on 10.08.2009 23:57 'typos'fschulze,
I face the same issue in Excel 2003: Run-time error 91, Object variable or With block variable not set.
This happens everytime when I try to refresh the data after I open a saved excel template. But the refresh works fine when the report is initially downloaded using the Analyzer for Excel button
Have you found the workaround for this problem ?
Thanks. -
Power control switch for 115VAC wall outlet to operate resistance heating element.
I am very new to LabView software as well as hardware
interfacing, so don't presume that I know anything. My problem seems
simple, I want to be able to control and automate via LabView software a resistance
heating element that can plug into a standard 115VAC wall outlet. I
searched through the Knowledge Base and found this comment:
http://digital.ni.com/public.nsf/allkb/855AF9CBDAACE3018625725A00638653
The PXI 2564 seemed ideal but I have no clue how to connect the serial port to
my heating element, or even if this is enough current (5A, do heating elements
need a certain wattage?) I had originally envisioned a simple surge
protector like device that had computer control options. Many devices
like this are available, however all the ones I have found are web-accessed via IP address
and I am unsure how to interface this type of device with LabView if it has its
own GUI. Obviously I have no idea what I am doing here so any help would
be much appreciated. The heating element requires 115VAC or DC it does
not matter, and all I need to do is turn the power on and off, no variance is
required, although that could be very useful. I have implemented a NI
CompactDAQ for other control and measurement (24VDC Digital I/O and Thermocouple) if this
could somehow play into my solution, but I believe the limits on voltage for
this device are much lower. Thanks!Hi Anfu,
LabVIEW gives you the power to control and automate all National Instruments hardware using NI drivers (i.e. NI-DAQmx). I have a couple of NI hardware suggestions, but it's up to you to decide on the hardware that will best fit your application. Even if you end up using third-party hardware, I think you will find LabVIEW is a great interface to control and/or automate your hardware.
The resistance heating element you want to control...you state it is powered via wall voltage, but you did not state the required current. This is important information you should be able to find in the heating element's data sheet. The amount of current you need at 115 VAC (or DC) will determine your desired relay characteristics. Once you know the voltage and current (or power) the heating element requires, you can calculate the hardware specifications that are necessary for your application - and can confidently select the correct hardware.
Starting from the fact you need to switch wall voltage, you will want a switch rated for Measurement Category II (CAT II). This classification ensures you will be kept safe from the high voltages being switched. National Instruments has PXI hardware that can switch wall voltages, as you mentioned previously, and one of these switches is the PXI-2564. Your computer would communicate with the PXI-2564 through its PCI bus, not its serial port. Several methods to connect your PCI bus to PXI is to purchase a MXI-4 card (this would fit in one of your computer's PCI slots) that cables to a PXI chassis (in which the PXI-2564 is located). Also, you can purchase an embedded PXI controller (then you wouldn't need a separate computer, as the embedded PXI controller houses a laptop-like computer). In total, you would need a PXI-2564, a PXI chassis, and either a MXI-4 or embedded PXI controller.
If PXI doesn't seem ideal, instead you could create a Plug-and-Play (PnP) SCXI system! First, choose a SCXI switch module (such as a SCXI-1127). Then, you can purchase a USB-1357 to control the SCXI-1127 module from one of your computer's USB slots. In total, you would need a SCXI-1127 module, a 4-slot SCXI chassis, and a USB-1357.
Another option is the SCXI-1161. Unfortunately, the USB-1357 doesn't connect to the rear of the SCXI-1161, but there is there are two additional options available for controlling the SCXI-1161. One is to purchase a PCI DAQ module (or use one if you already have one) and connect it to the SCXI-1161 using the SCXI-1349. The other is to purchase a SCXI-1600 (which is a DAQ board, SCXI form factor) that you control via USB. In total, you would need a SCXI-1161, a 4-slot SCXI chassis, and a SCXI-1600 or a DAQ board and a SCXI-1349.
Either way, the PXI and SCXI options both give you the full functionality of a modular, LabVIEW-controlled switch. Upon purchasing the switch module, you also get the required drivers, getting-started and troubleshooting tools (such as the NI-SWITCH Soft Front Panel), and examples to get you up and running quickly.
In reference to the simple surge protector like device that has computer control options - I'm sure someone from the LabVIEW forum could assist you in communicating to one of these devices via the web. Don't worry, if the device can be controlled via the web, you're good to go.
Lastly, in response to your final statements, it is important to find out how much current or power the heating element requires because that will directly determine your required switch hardware specifications. You mention no variance is required, which is good, because the switch will simply turn on or off the power to the heating element. I agree a NI CompactDAQ option could be very useful for an application such as this, however there are no CAT II relay or switch modules for this form factor at this time.
Hope this helps!
Chad Erickson
Switch Product Support Engineer
NI - USA -
ICloud 3.0 Control Panel for Windows - Non-IE Bookmark Sync
FYI
The new iCloud Control Panel for Windows 3.0 offers bookmark sync with Chrome and Firefox
I could not get the new iCloud Control Panel for Windows 3.0 to recognize bookmark sync for any browser except IE. I downloaded the Firefox add-in and enabled it but it would not show Firefox bookmark sync as an option.I tried deleting and reintstalling both the iCloud Control Panel and Firefox.
I finally solved the issue and got it work when I removed the additional profiles for Firefox.
Check your (windows) Firefox profile at:
users/yourusername/app data/roaming/mozilla/profiles
Once I deleted the additional profile and restarted Firefox and the iCloud Control Panel I was able to select Bookmark sync with Firefox or Chrome.
I hope this helps others that could not enable this option.Hello Todd,
I too have the same problem (I can not display the "Options" button on the control panel, therefore I can not synchronize)
I looked in the profiles of Mozilla Firefox, but unfortunately I have only one profile (default profile)
How do I solve the problem?
Thank you very much
Maurizio
Maybe you are looking for
-
DEBMAS - 'Application document not posted'
HI, We are passing DEBMAS and ADRMAS from MDM to R/3 via XI. ADRMAS gets posted successfully. However in case of DEBMAS we get Error 51 'Application document not posted'. While debugging we found that the messages are not passed to T_BDCMSGCOLL (incl
-
Hi All, Could someone help me in solving my problem while running my form I have installed Forms [32 Bit] Version 10.1.2.0.2 (Production) and Installed JInitiator 1.3.1.22. I have configured FORMS_PATH at default.env file. I am using Databse 10.2 and
-
Applications Browser Logon & Connection Refused & Cannot reconnect to gatew
Help, When running applications logon http://bh001.home:8000/OA_HTML/AppsLocalLogin.jsp I recieve a connection refused error. Associated with this is the following when running "adstrtal.sh APPLSYS/APPS" are the following errors =====================
-
Where do I begin with my questions! I am trying to sync my iphone with my address and calendar from my former Palm Centro using a Vista operating system. Plus, when that did not work, I started entering new data to Windows Calendar. When I tried to s
-
Export Launches Windows Live ID Login Screen
I am having a prob with Lightroom Whenever I try to Export, I get a Windows Live ID Login Screen, which eventually hangs and crashes LR. Anyone else have this prob, or a suggestion as to how to solve it. Thanks Colin