Click here to Skip to main content
15,891,657 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Change mac address by vba Pin
Member 1447788423-Dec-20 18:35
Member 1447788423-Dec-20 18:35 
GeneralRe: Change mac address by vba Pin
Gerry Schmitz24-Dec-20 5:14
mveGerry Schmitz24-Dec-20 5:14 
GeneralRe: Change mac address by vba Pin
Dave Kreskowiak24-Dec-20 5:21
mveDave Kreskowiak24-Dec-20 5:21 
AnswerRe: Change mac address by vba Pin
Richard MacCutchan23-Dec-20 21:54
mveRichard MacCutchan23-Dec-20 21:54 
AnswerRe: Change mac address by vba Pin
Gerry Schmitz24-Dec-20 5:07
mveGerry Schmitz24-Dec-20 5:07 
QuestionIs there Access VBA method of translating text in a textbox? Pin
Member 1181158314-Dec-20 3:18
Member 1181158314-Dec-20 3:18 
AnswerRe: Is there Access VBA method of translating text in a textbox? Pin
Richard Deeming14-Dec-20 4:02
mveRichard Deeming14-Dec-20 4:02 
GeneralRe: Is there Access VBA method of translating text in a textbox? Pin
Member 1181158314-Dec-20 4:56
Member 1181158314-Dec-20 4:56 
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
GeneralRe: Is there Access VBA method of translating text in a textbox? Pin
Member 1181158314-Dec-20 11:41
Member 1181158314-Dec-20 11:41 
QuestionVisual Studio RDLC expression editor in the report designer and help with expressions Pin
jkirkerx5-Dec-20 10:26
professionaljkirkerx5-Dec-20 10:26 
AnswerRe: Visual Studio RDLC expression editor in the report designer and help with expressions Pin
jkirkerx5-Dec-20 13:10
professionaljkirkerx5-Dec-20 13:10 
AnswerRe: Visual Studio RDLC expression editor in the report designer and help with expressions [solved] Pin
jkirkerx6-Dec-20 9:35
professionaljkirkerx6-Dec-20 9:35 
QuestionCall a method inside a Task.Run and return the value Pin
Mc_Topaz2-Dec-20 3:03
Mc_Topaz2-Dec-20 3:03 
AnswerRe: Call a method inside a Task.Run and return the value Pin
Richard MacCutchan2-Dec-20 3:23
mveRichard MacCutchan2-Dec-20 3:23 
AnswerRe: Call a method inside a Task.Run and return the value Pin
Gerry Schmitz2-Dec-20 5:23
mveGerry Schmitz2-Dec-20 5:23 
Questionvb.net addin won't run in release mode Pin
JR21230-Nov-20 23:53
JR21230-Nov-20 23:53 
AnswerRe: vb.net addin won't run in release mode Pin
BabyYoda1-Dec-20 5:53
BabyYoda1-Dec-20 5:53 
GeneralRe: vb.net addin won't run in release mode Pin
JR2121-Dec-20 6:22
JR2121-Dec-20 6:22 
QuestionRe: vb.net addin won't run in release mode Pin
Richard MacCutchan1-Dec-20 6:36
mveRichard MacCutchan1-Dec-20 6:36 
QuestionCreate Multi Series Chart in VB.net Pin
Member 1500024122-Nov-20 21:46
Member 1500024122-Nov-20 21:46 
AnswerRe: Create Multi Series Chart in VB.net Pin
Richard Deeming22-Nov-20 22:22
mveRichard Deeming22-Nov-20 22:22 
Questionneed some guidance and advice to build a questionnaire system similar to Google forms in vb.net or c# and sql server Pin
albasheer210019-Nov-20 18:05
albasheer210019-Nov-20 18:05 
AnswerRe: need some guidance and advice to build a questionnaire system similar to Google forms in vb.net or c# and sql server Pin
Richard MacCutchan19-Nov-20 22:14
mveRichard MacCutchan19-Nov-20 22:14 
AnswerRe: need some guidance and advice to build a questionnaire system similar to Google forms in vb.net or c# and sql server Pin
CHill6020-Nov-20 1:59
mveCHill6020-Nov-20 1:59 
QuestionSend a file via a bot telegram vb.net Pin
Member 1496222414-Nov-20 11:33
Member 1496222414-Nov-20 11:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.