Visual Basic for Applications (VBA) is an event-driven, object-oriented programming language for writing macros, used for the entire Office suite. If your question is specifically about programming Excel, Access, Word or Outlook, use the appropriate tag: excel-vba, access-vba, word-vba or ...
0
votes
1answer
16 views
Can't figure out this syntax error VBA SQL
I'm having an issue with Access. I'm trying to update one table (shipmentdata) with a few values from another table (customers). This is my code right now:
Option Compare Database
Sub Update()
Dim ...
0
votes
0answers
18 views
For-Loop to assign index value Excel VBA
Apologies for the naive nature of this question but I am very new to VBA.
I have a column of data with the number of pageviews a particular page has had.
I then have a seperate sheet that assigns ...
-2
votes
0answers
13 views
VBA code return number pages resulting in print preview pivot table
I have Access 2007 I need code VBA to know the number of pages resulting in Print Preview to pivot table . Please reply and help me
0
votes
0answers
8 views
Export each slide of Powerpoint to a separate pdf file
I need to generate for each slide of my presentation a pdf file.
I'm using the following code:
ActivePresentation.ExportAsFixedFormat ActivePresentation.Path & "\" & ActivePresentation.Name ...
-1
votes
0answers
19 views
How to check if a website (example.com) is open in any web browser . VB .NET , return with boolean
im developing an application. this application will check for the opened state of a website in any browser...for example , when i open example.com , my application will be asked to check if the ...
0
votes
2answers
14 views
VBA Select Last Column and Last Row
I am trying to select the bottom most right cell in my field of data. I have a 20x20 grid of data and need to find the last column that it would go down to find the last row that has data. I am having ...
0
votes
1answer
19 views
Access VBA SQL Query for partial words?
I am trying to search for partial word(s) and it seems to only return results with the searched word in the beginning.
Example, there's a project called "Test Name" and "Test Name1". And if I search ...
0
votes
2answers
11 views
openrecordset only showing one result
When I use a recordset to read from a table everything works fine and the recordcount function shows me the correct amount, but when I use this simple query or any query I always get 1 as a ...
0
votes
1answer
12 views
VBA If statements with public variables error type mismatch (error 13)
I think this is probably a quick fix but its been stumping me all morning.
I have defined many variables as public at the top of the vba project (any variables ending in "yn" are String, and the ...
0
votes
2answers
17 views
compiler error calling a private sub procedure
Private Sub Workbook_SheetSelectionChange _
(ByVal Sh As Object, ByVal Target As Excel.Range)
x = Sh.UsedRange.Rows.Count
End Sub
I have a private sub procedure like this and I am ...
0
votes
1answer
10 views
Clear new lines in Docx VBA
I need to delete all of new lines if is consecutive, i know macros in excel but not in word, how can i read the value of an entire line?
I read all the lines in the doc with this:
For i = 1 To 10
...
0
votes
0answers
7 views
PowerPoint API or VBA Code to Increase Range of 'Snap Object to Object'?
Thanks for visiting this thread. I was hoping somebody could give me a hand with this, because I do not even know where to begin. However, I can imagine a relatively simple string of code can achieve ...
1
vote
1answer
18 views
concatenation and max length of string in VBA, access
I've had severas problems with strings in access-vba.
The thing is, access (sometimes) limit the string's length to about 255 characters.
However, depending on HOW the string was built, it may be ...
0
votes
1answer
16 views
Check for lines in txt file starting with particular word and count the occurences
I've been trying to check if a given txt file has lines that start with a particular word. I then want to count the number of lines that start with that word. Though I can't quite get it right, I do ...
0
votes
1answer
34 views
How to reverse the order of rows
I try to write a macro that would reverse order of rows in my Excel worksheet, but unfortunately I fail. I don not know even how to start. I would be very grateful for any help or hints on how to do ...