|
You have the wrong expectation of this forum, you need to do the work and ask specific coding questions.
I suggest
Clearly define the rules for each column.
Define the rules for each aggregation.
Break the process down into smaller pieces ie. get the column headers correct then get the aggregations correct then put the data into the correct columns.
It is your problem, you cannot expect strangers to define the business rules from a bunch of data for you.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
i want to change mac address by vba code, pls help me, thanks
|
|
|
|
|
Why would you want to change it? It's only ever used to identify network interfaces on a network subnet. That's the only use for it.
|
|
|
|
|
example:
when i login 5 facebook, but i only have 1 laptop. If i use 1 web browser to login, may i have checkpoint? So this case, i open browser then change user agent, change mac address
Can you help me
This links change user agent, but only extension https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg?hl=vi, you can see it
|
|
|
|
|
Maybe you're thinking of "IP address". And a checkpoint is like a (software system) snap shot; how is that relevant?
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
That made no sense what-so-ever.
The MAC address isn't going to impact any application. Changing it will do nothing. There is no "checkpoint" and there is nothing like that attached to the MAC address.
|
|
|
|
|
|
The concept seems "unreal"; since the (hardware) MAC address incorporates the Vendor's id.
In any case, "my" control center doesn't show the MAC address as changeable (contrary to the "adverts"). And I'm an Admin.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Is there a Access VBA version of Google Translator please?
Or, if no, any other Access VBA code using Google's Translation API?
Or, if no, any other Access VBA method of getting a translation of a text written in Language1 in Textbox1 on an Access Form1, into Language2 in Textbox2 in the same Form?
I can code only in Access VBA and am not fluent with APIs. I have found only old Excel VBA solutions, and don't know how to adapt the code to Access VBA. My PC is running Win 10.
Thanks!
|
|
|
|
|
Unlike earlier versions of Office, the VBA that runs in Access is the same as the VBA that runs in Excel. The only difference will be how you access the host Office application.
If you have code that works in Excel, then it should work in Access as well.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thank you Richard Deeming. I decided to first try out the Excel Code (below) on Excel.
On the .Navigate command, Microfot Edge opened the site correctly
But on the While...Wend statement the code froze or raised Run-time error 462 :
"The remote server machine does not exist or is unavailable". I re-tried many times.
Tony
Option Explicit
Sub Button1_Click()
Dim TestString As String
TestString = "Hello world. Are you ready for us?"
MsgBox VBA_Translate(TestString, "en", "fr")
End Sub
Function VBA_Translate(strSource As String, strSourceLang As String, strDestLang As String) As String
' Adopted from: http://stackoverflow.com/questions/1...text-using-vba
' Set a reference to Microsoft Internet Controls from Tools, References in VBE [OK]
' Source: http://www.vbaexpress.com/forum/showthread.php?52248-google-translator-vba-code-stop-working
Dim j As Long
Dim Web_Translation
With CreateObject("InternetExplorer.Application")
' .Visible = False
.Navigate "http://translate.google.com/#" & strSourceLang & "/" & strDestLang & "/" & strSource
While .Busy Or .ReadyState <> 4
DoEvents
Wend
Application.Wait (Now + TimeValue("0:00:05"))
Web_Translation = Split(Application.WorksheetFunction.Substitute(.Document.getElementById("result_box").innerHTML, "", ""), "<")
.Quit
End With
VBA_Translate = ""
For j = LBound(Web_Translation) To UBound(Web_Translation)
VBA_Translate = VBA_Translate & Right(Web_Translation(j), Len(Web_Translation(j)) - InStr(Web_Translation(j), ">"))
Next
End Function
|
|
|
|
|
' The following code is working for me.
' I have adapted, and converted to Access VBA, some Excel VBA code suggested at https://www.mrexcel.com/board/threads/google-translate-excel-vba.1079457/
' Thanks to Dossfm0q on July 24th 2020 This seems to be executing an instance of Mozilla Firefox.
' I do have Firefox installed and it's my default browser. Not sure if this is relevant.
' While I could not get Dossfm0q's code to work, I noticed that the text in objHTTP.ResponseText DID in his code in fact contain the translated text,
' and that this occurred between the string div class="result-container" just before it and /div just after it.
' so I altered his function to strResponseText() and wrote a function GetTranslatedTextFrom(ResponseText As String) As String to obtain the translated text.
' I am sure that this is less elegant than Dossfm0q's use of objHTML.getElementsByTagName("div") ,
' but since that did not work for me, I had no choice.
<pre lang="vb">
Public Function GetTranslatedTextFrom(TextToTranslate As String, FromLangCode As String, ToLangCode As String) As String
On Error GoTo Get_Err
Dim ResponseText As String
Dim GotAnError As Boolean, PosPrefix As Long, PosAfterPrefix As Long, LenPrefix As Long, PosSuffix As Long, lenSuffix As Long
Dim Prefix As String, Suffix As String
GotAnError = False
ResponseText = strResponseText(TextToTranslate, FromLangCode, ToLangCode)
Prefix = "<div class=""result-container"">"
LenPrefix = Len(Prefix)
Suffix = "</div"
lenSuffix = Len(Suffix)
PosPrefix = InStr(1, ResponseText, Prefix)
If PosPrefix = 0 Then MsgBox "Failed!": GoTo PreExit
PosAfterPrefix = PosPrefix + LenPrefix
PosSuffix = InStr(PosPrefix, ResponseText, Suffix)
GetTranslatedTextFrom = Mid(ResponseText, PosAfterPrefix, PosSuffix - PosAfterPrefix)
PreExit:
Exit Function
Get_Err:
GotAnError = True
MsgBox str(Err) & " " & Err.Description, vbOKOnly, "Error in Sub: [SiftResponseText]"
Resume PreExit
End Function
Public Function strResponseText(strInput As String, FrmLng As String, ToLng As String) As String
On Error GoTo Goo_Err
Dim GotAnError As Boolean
GotAnError = False
Dim strURL As String
Dim objHTTP As Object
Dim objHTML As Object
Dim objDivs As Object, objDiv As Object
Dim strTranslated As String
strURL = "https://translate.google.com/m?hl=" & FrmLng & _
"&sl=" & FrmLng & _
"&tl=" & ToLng & _
"&ie=UTF-8&prev=_m&q=" & strInput
Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
objHTTP.Open "GET", strURL, False
objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
objHTTP.send ""
Set objHTML = CreateObject("htmlfile")
With objHTML
.Open
.Write objHTTP.ResponseText
strResponseText = objHTTP.ResponseText
.Close
End With
Set objHTML = Nothing
Set objHTTP = Nothing
PreExit:
Exit Function
Goo_Err:
GotAnError = True
MsgBox str(Err) & " " & Err.Description, vbOKOnly, "Error in Sub: [GoogTranslate]"
Resume PreExit
Resume Next
End Function
|
|
|
|
|
I've been using the RDLC design editor in VS 2017+ for a long time, and finally decided to ask about it.
The editor allows for multiple lines, but my expressions are always one liners. I remember in the past trying to use multiple lines but never had any luck. If there a char I need to add at the end of a line to use multiple lines?
I'm beginning to use notepad now to edit this expression.
I need to write this expression to check and make sure that the values are not 0 before I run the equation, but I'm not having any luck. I'm not sure why this expression crashes on 0's when I'm checking, it looks good to me but I'm not sure how to fix it. Maybe I should flip it around. Do the IFF and format the number in the IFF statement.
This expression compares sales in 2017 against sales in 2016, and show the percent of change.
FYTD4 is 4 years back
FYTD3 is 3 years back
On some items they are 0 because they didn't exist in those years.
=FormatNumber(IIF(Fields!FYTD3_A.Value > 0 and Fields!FYTD4_A.Value > 0, ((Fields!FYTD3_A.Value - Fields!FYTD4_A.Value) / Fields!FYTD3_A.Value) * 100, 1), 0) & "%"
I also need to write a color expression as well. It works without the % sign tacked on the previous expression. I searched around for a way to evaluate me.value and strip out the % sign with no luck.
=iif(me.value < 0, "Red", "Green")
Last, I wanted to add a red or green arrow pointing up or down after the % sign. I tried an image, but the table cell seems to only take 1 element like text, or image and not a combination of both.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
I don't think it's my expression, when I get the #error, the two values are 0.
Too bad they don' t have try catch expression.
=IIF(Fields!FYTD3_A.Value > 0 and Fields!FYTD4_A.Value > 0, FormatNumber(((Fields!FYTD3_A.Value - Fields!FYTD4_A.Value) / Fields!FYTD3_A.Value) * 100, 0), 1) & "%"
And got the color expression to work
=iif(cdec(me.value.ToString().Replace("%", "")) < 0, "Red", "Green")
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
"or", not "and" for the 0 test
Duh!
I converted the expression to code and model, and calculated it. Then I saw the mistake.
So I have everything but the up or down arrow symbol now.
Oh well.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
I have a method Bar .
Bar take some arbitrary amount of time to complete.
I want to call Bar from a method Foo .
Foo run some code sync and last run Bar async.
Bar returns a value and I want Foo to return the same value.
Here is the code to reproduce the behavior:
Module Module1
Sub Main()
Dim i As Integer = Foo()
Console.Write("Enter anything: ")
Console.ReadLine()
Console.WriteLine(i)
End Sub
Async Function Foo() As Task(Of Integer)
Console.WriteLine("Do something sync")
Console.WriteLine("Do something sync")
Return Await Task.Run(Function() Bar())
End Function
Function Bar() As Integer
Console.WriteLine("Bar Start")
Threading.Thread.Sleep(2000)
Console.WriteLine("Bar Stop")
Return 5
End Function
End Module But I get a compile error in the Main method:
Dim i As Integer = Foo() Value of type Task(Of Integer) cannot be converted to Integer.
I understand the error, but I don't understand how I should solve it.
I tried this line:
Dim i As Integer = Foo().Result Which compiles and runs. But the call to the Bar method ran sync, not async.
How should I alter the code to run Bar async and from Foo only return the value from Bar ?
|
|
|
|
|
|
In C#, it would be.
var something = await Foo();
int i = something.Result;
in this case "var", is the same as Task<int> at compile time.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Hi,
I wrote a small addin works perfect in debug-mode, however when I run it in Release-mode I get this error.
Microsoft.VisualStudio.Tools.Applications.Deployment.AddInAlreadyInstalledException: De aanpassing is niet geïnstalleerd omdat er momenteel een andere versie is geïnstalleerd waarvoor geen upgrade kan worden uitgevoerd vanaf deze locatie. Als u deze versie van de aanpassing wilt installeren, moet u eerst Software gebruiken om het volgende programma te verwijderen: CalPicklist. Installeer vervolgens de nieuwe aanpassing vanaf de volgende locatie: file: bij Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySolutionCodebaseIsUnchanged(Uri uri, String subscriptionId, Boolean previouslyInstalled)
bij Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
Sorry that's in my language.
When I try to install it after the publish No error is given but also not loading.
Any ideas what went wrong.
I already use clean on the project but no luck.
Jan
|
|
|
|
|
|
I found that to. no help sorry
Jan
|
|
|
|
|
Translation: The customization is not installed because another version is currently installed that cannot be upgraded from this location. To install this version of the customization, you must first use Software to remove the following program: CalPicklist. Then install the new customization from the following location: file: /// D: / Stack / Visual Studio 2019 / Projects / Office / Excel / CalPicklist / bin / Release / CalPicklist.vsto
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySolutionCodebaseIsUnchanged (Uri uri, String subscriptionId, Boolean previouslyInstalled)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn ()
Have you done what the message says?
|
|
|
|
|
Hello,
I would like to make a multi Series chart in vb.net how many of series depends on the department and the data gathered from a data-table which is collected from a DataGridView.
The table is shown as follow:
Department Period_Shown Rate_Int
EMW 2018 0.94
EMW 2019 0.55
ACH 2015 0.29
ACH 2016 0.52
ACH 2017 0.56
ACH 2018 0.63
ACH 2019 0.57
It have error on my code and it made the server freeze. Here is the warning message: Using the iteration variable in a query expression may have unexpected result. Instead create a local variable within the loop and assign it value of the iteration variable.Here is the source code for the chart control. Can anyone help me to fix it?
Dim dtRate As New DataTable("dtRate")
For Each cell As TableCell In GridView1.HeaderRow.Cells
dtRate.Columns.Add(cell.Text)
Next
For Each row As GridViewRow In GridView1.Rows
dtRate.Rows.Add()
For i As Integer = 0 To row.Cells.Count - 1
dtRate.Rows(row.RowIndex)(i) = row.Cells(i).Text
Next
Next
Dim Departments As List(Of String) = (From p In dtRate.AsEnumerable() _
Select p.Field(Of String)("Department")).Distinct().ToList()
If RateChart.Series.Count() = 1 Then
RateChart.Series.Remove(RateChart.Series(0))
End If
For Each UserDepartment As String In Departments
Dim x As Integer() = (From p In dtRate.AsEnumerable() _
Where p.Field(Of String)("Department") = UserDepartment _
Order By p.Field(Of Integer)("Shown_Period") _
Select p.Field(Of Integer)("Shown_Period")).ToArray()
Dim y As Integer() = (From p In dtRate.AsEnumerable() _
Where p.Field(Of String)("Department") = UserDepartment _
Order By p.Field(Of Integer)("Shown_Period") _
Select p.Field(Of Integer)("Num_Int")).ToArray()
RateChart.Series.Add(New Series(UserDepartment))
RateChart.Series(UserDepartment).IsValueShownAsLabel = True
RateChart.Series(UserDepartment).BorderWidth = 3
RateChart.Series(UserDepartment).ChartType = SeriesChartType.Line
RateChart.Series(UserDepartment).Points.DataBindXY(x, y)
Next
RateChart.Legends(0).Enabled = True
RateChart.Visible = True
btn_Print.Visible = True
End Sub</<pre lang="vb">
pre>
|
|
|
|
|
|
I need some guidance and advice to build a questionnaire system similar to Google forms that include two parts,
the first part is a desktop system with vb.net or c# and separate SQL server database (it must be a desktop system because it will be part of a vb.net old system, The new project will be called from within the main interface of the old project )
and the second part is a web system, and the two systems are linked to one SQL server database through a local network and a local server
the desktop system builds multiple questionnaires forms and each questionnaire is associated with a specific user to answer these questions through the web system via the username that will be assigned to him by the desktop system... Here, I would like to note that each user has a different questionnaire from the other...
The desktop system will also use the answers to build a dashboard has charts and report based on the analysis of the answers
My questions ...
1- What is the best way to design (questionnaire builder) if I want it to work and similar to Google Forms method and user interface of building questions if each user has its own questionnaire that contains an unlimited set of questions, the new question is added through the Add button and each question is specified by the admin It determines the nature of the answer and the answer and contains a tool to choose a specific classification from a group of classifications that are added to the system, and each question contains in addition to the answers a field of notes and evaluation from 1 to 5, and after building this questionnaire for a specific user it is permanently saved and linked with this user and there is a possibility to edit these questions on This questionnaire for the future.
Is the User Control method the best way to build a question-building interface, or is there a better way and how?
2- What are your tips and directions that help me to build a better design for such a system?
Greetings
|
|
|
|
|